Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 23686

Summary: undoing of string split - undoes too much
Product: [Eclipse Project] JDT Reporter: Adam Kiezun <akiezun>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: enhancement    
Priority: P3    
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Patch: Undo line at a time none

Description Adam Kiezun CLA 2002-09-18 05:42:49 EDT
20020917
edit this:
Sting d= "dsasdasd";

split the string a couple of times - add some more lines.

press ctrl+z - all that editing you did is undone. it should undo only one line 
at a time
Comment 1 Kai-Uwe Maetzel CLA 2002-09-18 12:51:38 EDT
I am unsure. I actually expect it to be undone all at once. Leaving open for 
consideration.
Comment 2 snowl CLA 2003-03-14 17:36:49 EST
I've just checked VisualJ++, IntelliJ and EditPad. Editpad works like Eclipse 
the other two undo a line at a time. I prefer line at a time (although this 
might increase the small undo limit problem #21476).

Actually VJ++ and IJ need two undos to undo a line; the first undoes the text 
the second undoes the carrage-return. This seems silly at first, but after 
playing with it for a while it does work well.
Comment 3 snowl CLA 2003-04-12 05:31:41 EDT
Created attachment 4562 [details]
Patch: Undo line at a time

This patch will undo changes a line at a time (as a I described above).

Since this patch increases the strain on the already small undo buffer I
recommend you increase it to 1000 or something at the same time.
Comment 4 Dani Megert CLA 2004-01-05 12:20:07 EST
works for me using 3.0 M6
Comment 5 snowl CLA 2004-01-05 18:06:36 EST
This bug is a subset of a larger one. Though the case mentioned here does work 
as requested, normal editing does not. I have raised the general case as an 
enhancement (bug 49553).