This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 258377

Summary: [regression] Undo doesn't scroll editor to the caret position
Product: editor Reporter: Vladimir Voskresensky <vv159170>
Component: NavigationAssignee: Miloslav Metelka <mmetelka>
Status: RESOLVED FIXED    
Severity: normal CC: legitalk, muellermi
Priority: P1    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Vladimir Voskresensky 2016-03-15 11:35:24 UTC
open file longer than two screens
modify the line on top of file
scroll down to make modified line non visible in editor view
press Undo
Previously:
- IDE made undo and modified line visible 
Now:
- only undo is done, but view is not scrolled up
Comment 1 Miloslav Metelka 2016-03-22 15:14:42 UTC
It's a regression due to EditorCaret integration. I'm already working on a fix.
Comment 2 Miloslav Metelka 2016-04-06 13:08:20 UTC
*** Bug 258577 has been marked as a duplicate of this bug. ***
Comment 3 Miloslav Metelka 2016-04-06 16:05:18 UTC
http://hg.netbeans.org/jet-main/rev/9c4d02304d50
Comment 4 Quality Engineering 2016-04-07 01:52:56 UTC
Integrated into 'main-silver', will be available in build *201604070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/9c4d02304d50
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #258377 - [regression] Undo doesn't scroll editor to the caret position.
Comment 5 Vladimir Voskresensky 2016-04-08 14:25:27 UTC
Mila, the bug is still reproducible.
The simplest test case:
create small Java file (all content see on the screen).
Put cursor i.e. in copyright comment then without selecting words press Backspace button many times with delays.

Move cursor to other line. Press Undo and cursor still remains on the line
Comment 6 legitalk 2016-04-11 12:13:02 UTC
I can also confirm the bug is still reproducible. While editing PHP file with more screens.
Comment 7 Miloslav Metelka 2016-04-12 22:32:44 UTC
I have fixed the mentioned case but the problem is broader so I have entered issue 258798 for full resolution.

http://hg.netbeans.org/jet-main/rev/84c8d40842be
Comment 8 Quality Engineering 2016-04-14 02:40:46 UTC
Integrated into 'main-silver', will be available in build *201604140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/84c8d40842be
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #258377 - [regression] Undo doesn't scroll editor to the caret position - fixed additional cases.
Comment 9 Vladimir Voskresensky 2016-04-15 00:05:58 UTC
(In reply to Miloslav Metelka from comment #7)
> I have fixed the mentioned case but the problem is broader so I have entered
> issue 258798 for full resolution.
> 
> http://hg.netbeans.org/jet-main/rev/84c8d40842be
Would comment/uncomment be fixed as part of issue 258798 as well?
Comment 10 Jiri Prox 2016-04-21 22:28:06 UTC
*** Bug 258730 has been marked as a duplicate of this bug. ***
Comment 11 legitalk 2016-04-28 14:13:05 UTC
This bug was fixed, but now, in build 201604280002 it is again broken and the screen is not moved to the caret position after undo / redo.
Comment 12 Miloslav Metelka 2016-04-29 08:44:27 UTC
The fix of issue #258798 should eliminate this problem too.
I've tested both the typing which already uses the EditorUtilities.addCaretUndoableEdit() and the not yet patched Ctrl+/ to comment line and both scrolled ok.