Author |
Topic |
|
jmihalicza
Ketchup Master
Hungary
66 Posts |
Posted - Aug 09 2007 : 04:48:56 AM
|
Hi,
Currently if I paste a code fragment and it is reformatted, I can step back to the result of the paste before the reformatting with the undo command. If I would like to undo the paste back, I invoke an undo again. This is comfortable, because in most cases I like reformatting, and I can undo it, but only the reformatting when I don't like the result.
This behavior would be nice in all cases when the code is changed by VA automatically. I experienced the lack of it when pressed '*' and got comments. I would expect undo step back to a state when the asterisk is inserted. I know that technically it is a bit like hack to insert the asterisk in a command and delete it and do commenting in another command only for the undo behavior, but it may be useful. Of course there are some other cases to consider, like pressing '#' etc., a general consistent solution would be nice.
Regards, Joc+? |
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Aug 09 2007 : 07:12:52 AM
|
Assuming you have:
VA Options -> Advanced -> Correction -> Format after paste
turned on, when you paste code into the IDE the paste is the first operation, and then VA asks the IDE to format this code, which is the second operation. So there are two separate operations to undo.
When you select code and press '*' to surround the code with comments no single star is ever inserted. You have effectively used a keyboard shortcut for a single command.
Since these commands only work on selected text there is no where to insert a single character, since inserting a single character would delete the selected text. People are not going to expect undo to delete a block of code. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|
|
|