| Summary: | [typing] Undo is not grouped after Ctrl+X or Ctrl+Z in linked mode | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Markus Keller <markus.kell.r> | ||||
| Component: | Text | Assignee: | Dani Megert <daniel_megert> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | benno.baumgartner, daniel_megert, eclipse, koen.van.dijken, martinae, Mike_Wilson, mlists | ||||
| Version: | 3.0 | Flags: | markus.kell.r:
review+
|
||||
| Target Milestone: | 3.8 RC1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 185043 | ||||||
| Attachments: |
|
||||||
|
Description
Markus Keller
expected should be (talked to Markus): String string= null; return string; See also bug: 31813. Note: Works if Delete is hit instead of Ctrl+X Resetting priority to P3. Will be reassessed for the next release. *** Bug 94272 has been marked as a duplicate of this bug. *** *** Bug 185043 has been marked as a duplicate of this bug. *** *** Bug 185125 has been marked as a duplicate of this bug. *** *** Bug 187488 has been marked as a duplicate of this bug. *** Is this still on the radar for 3.4? Sorry, no time for 3.4 unless we get a patch. Created attachment 215323 [details]
Fix
In the current code change were only group as a result of key events being processed. The attached patch ensures that any modification to the document opens a compound change. All Text tests pass. The "if (!fHasOpenCompoundChange)" is unnecessary and should be removed. The patch fixes the issue in comment 0, but the multi-undo scenarios from e.g. bug 94272 and bug 185125 are still not fixed. +1 for adding the beginCompoundChange();, but only if this bug or the other bugs stay open. (In reply to comment #12) > The "if (!fHasOpenCompoundChange)" is unnecessary and should be removed. Yes, but the code is more understandable. I removed it now, but renamed the method to beginCompoundChangeIfNeeded(). > The patch fixes the issue in comment 0, but the multi-undo scenarios from e.g. > bug 94272 and bug 185125 are still not fixed. Did you just pick them randomly, or do you know which ones are not fixed? I'm inclined to consider the other cases as WONTFIX. They don't happen often and don't justify further investigation. Committed, pushed and released the fix: http://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=ba8f3c1d6bfc90f4b454edbcb7e3d6579aa8dd83 > Yes, but the code is more understandable. I removed it now, but renamed the > method to beginCompoundChangeIfNeeded(). Then you should also rename endCompoundChange(). > > bug 94272 and bug 185125 are still not fixed. > > Did you just pick them randomly, or do you know which ones are not fixed? No, I tested them, and these two had clear test cases that were easily reproducible (though not entirely deterministic). They're actually the same problem, just not a dup of this bug. Reopened the other two bugs. Verified in 3.8-I20120512-2100 and 4.2-I20120513-1300.
>Then you should also rename endCompoundChange().
Will be done in next build.
|