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 251981 - Swap in Diff should not scroll at the beginning of the files
Summary: Swap in Diff should not scroll at the beginning of the files
Status: NEW
Alias: None
Product: utilities
Classification: Unclassified
Component: Diff (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ondrej Vrabec
Depends on:
Reported: 2015-04-22 09:44 UTC by kalwi
Modified: 2015-08-11 19:52 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description kalwi 2015-04-22 09:44:33 UTC
When comparing two files in Diff tool, the editor scrolls at the beginning of the files after swapping of left and right windows by pressing Swap button.

When I'm merging changes from file A to B, I often need to back-merge changes from B to A, so I use Swap in that case. As a workaround for scrolling, I have to remember the line number and then go to that line after swap, which is quite annoying.

It would be nice if the editor in Diff tool would remember the scolled position and it would not scroll at the beginning.
Comment 1 Ondrej Vrabec 2015-07-31 17:33:27 UTC
Sorry, this is the best i can do with the current API diff view provides. Note that even with a better API it would not be 100% reliable because of the level of asynchronoucity the diff view uses.
When swapped diff at least jumps to the current difference index it was previously showing, so at least it gets you closer to the exact location.

core-main #749861e9a90b
Comment 2 Quality Engineering 2015-08-02 01:15:08 UTC
Integrated into 'main-silver', will be available in build *201508020002* on (upload may still be in progress)

User: Ondrej Vrabec <>
Log: #251981 - Swap in Diff should not scroll at the beginning of the files

Remember at least the current difference index and on swap jump to it.
Comment 3 kalwi 2015-08-11 19:52:06 UTC
Thanks at least for this workaround, it will ease the work little bit.