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 253345

Summary: using undo after code formatting (Alt+Shift+F) results in random jumps in view
Product: editor Reporter: vaxquis
Component: Actions/Menu/ToolbarAssignee: Miloslav Metelka <mmetelka>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0.2   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description vaxquis 2015-07-07 20:33:37 UTC
As described; to reproduce it's AFAIK enough to have a couple page long Java source code open, then do any trivial edit on it that will make reformat valid, then reformat it, then use undo. The view will scroll to a quite arbitrary location in code, possibly dependent on the amount of lines added/removed/reformatted by the formatting. It's possible to "scoll" the view (note: even when in the middle of it!) by constantly using "reformat" and "undo" after each other, as any format-undo sequence will shift the view by some lines.

In most extreme cases (for long files, >=1k lines) the view can even jump by a couple of view pages.

Possibly related (though fixed) https://netbeans.org/bugzilla/show_bug.cgi?id=183998