views:

105

answers:

4

Sometimes, when coding in RAD Studio 2009 (Delphi), suddently the behaviour of the code editor changes. After such an event, a selection is no longer cleared on character input. This often happens after a session of very intense coding (many characters per second!), so I might accidently hit a keyboard (shortcut) combination.

Is this the case? How to "fix" the issue? (I want my selections to be ereased upon character input!)

A: 

Quit and restart the IDE is probably your only solution.

gbrandt
A: 

I have found some IDE/Editor instabilities too. It's probably a bug. Restarting the IDE solves the issue.

And I haven't found it in 2010 yet.

Gamecat
+10  A: 

This is a bug, and you don't have to quit and restart to fix it. Just hit Insert twice (which changes the text entry mode between Insert and Overwrite and then back) and your text selection will be back to working normally. It's notoriously difficult to pin down, though from my own experience it seems to have something to do with mixing SyncEdit and Undo. If anyone's able to find any way to reproduce this consistently, please send it to QC.

Mason Wheeler
"Just hit Insert twice"... That's good to know. Definitely quicker than my "workaround". I'll try to remember that the next time I run into this.
Chris Hesik
"Unfortunately", my code editor is working well right now, so I cannot test this method for a while... Nevertheless, I will mark this as the accepted answer, at least until I can disprove it!
Andreas Rejbrand
+1 for the double insert. I used to go into the editor options twice (turn on persistent blocks and turn them back off).
Marjan Venema
+1 for the double insert!
Jeroen Pluimers
+1 - I used to do what Marjan suggested
Gerry
+1  A: 

When this happens, you should be able to toggle the "Persistent blocks" option on and then off again. Go to "Tools | Options | Editor Options". Turn on "Persistent blocks", and click OK in the dialog. Then go back and undo that operation, and the editor should reset itself.

BTW, this is definitely a bug. If you are able to reliably reproduce it, a test case submitted to QualityCentral would be most useful.

Chris Hesik