Undo Granularity Wrong After Multiple CTRL-/ (Comment Line)

Hi,

I just went through a method commenting out several lines using CTRL-/ (a.k.a. "Comment Line"). Along the way, I realized I'd commented one I didn't want to, so I typed CTRL-Z. When I did that, all the lines I'd commented were undone!

If it matters, I was editing a Grails Service class.


JetGroovy: 1.0.14394
IDEA: 7.0.3 RC (#7718)
JVM: 1.6.0_04, 32-bit
Arch: x86
OS: Linux


Randall Schulz

4 comments
Comment actions Permalink

AFAIK this is IDEA usual behavior merging editing commands. I believe this is the same in java, so your question should be addressed to IDEA devs.

0
Comment actions Permalink

AFAIK this is IDEA usual behavior merging editing
commands. I believe this is the same in java, so your
question should be addressed to IDEA devs.


Indeed. I never encountered it before, but it cannot possibly be considered correct.

I should have mentioned, these were not contiguous lines. I did a series of click, CTRL-/; click, CTRL-/; and so on. Then they were all undone with a single CTRL-Z.


Randall Schulz

0
Comment actions Permalink

Well, FWIW - sitting in the airport and not having access to IntelliJ at the moment - it seems analogous to typing multiple characters and undoing them all at once.

0
Comment actions Permalink

But that's the point!

If you click and then type several characters and the click somewhere else and type some more, each of those "batches" of typed characters (each batch separated by selection events, be they mouse click, the use of keyboard-driven navigation or the issuing of a command that changes the selection) is separately undoable.

Say what you will, I will never be convinced that undoing in this manner is desirable behavior.


Randall Schulz

0

Please sign in to leave a comment.