Comment toggles not tracked in editing history

cautionbug's profile image cautionbug posted 9 years ago in General Permalink
Currently using 9.1.0.4898 x64 on Win 8.1

i've noticed toggling comments isn't detected & added to the edit history, so Undo skips past them.

To reproduce:
1. Type anything in a SQL script tab.
2. Type some more text on another line.
3. On the first line, use keyboard shortcut to toggle a line comment - mine is CTRL + /
4. Perform an Undo

The typing you did on line 2 is undone, but line 1 remains commented. Also, if you're working with a saved SQL file, the keyboard shortcut doesn't change the "edited" status of the file that triggers a prompt to save changes when it's closed.

i don't know if this applies to ALL edits done with keyboard shortcuts, but definitely happens with comments.
[expired user #9044]'s profile image [expired user #9044] posted 9 years ago Permalink
This is still the behavior on version 9.2.0.4971 (currently the latest version). There is no reason commenting shouldn't be tracked in history, and because it is not, some really weird and unexpected behavior is exhibited when using the "Un/comment" shortcut.

An example of weird behavior:
- Type some stuff on a new line
- Comment it out using "Un/comment"
- Undo

The result is that everything but the last 3 characters are deleted. This displays the problem pretty well, and demonstrates that it should be considered a bug (and not just a quirk), as it exhibits erroneous behavior.

Please login to leave a reply, or register at first.