Bug 99059 - Bad scrolling behavior in diff window
Bad scrolling behavior in diff window
Status: REOPENED
Product: utilities
Classification: Unclassified
Component: Diff
6.x
All All
: P3 with 5 votes (vote)
: TBD
Assigned To: Tomas Stupka
diff-issues@utilities
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-27 00:52 UTC by Jesse Glick
Modified: 2013-08-23 21:35 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
Screenshot showing misaligned diff blocks (still all on screen; no off-screen problems in this diff) (182.44 KB, image/png)
2007-03-27 18:23 UTC, Jesse Glick
Details
Screenshot showing even more misaligned diff (201.36 KB, image/png)
2007-03-31 02:29 UTC, Jesse Glick
Details
Screenshot from dev build (241.70 KB, image/png)
2007-10-23 18:52 UTC, Jesse Glick
Details
Screenshot using current sources (25.98 KB, image/png)
2008-03-05 17:01 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2007-03-27 00:52:48 UTC
While the new diff UI looks quite nice, the scrolling logic is broken. I use F12
to jump through changes. Usually the right pane (new source) is scrolled
acceptably, but the left pane is often not scrolled to a reasonable position.
Sometimes the old block is even scrolled offscreen completely! Furthermore, when
the old and new blocks are not aligned, it is difficult to see the lines
connecting them, because the angle is too steep, and (especially in a densely
changed region like the imports section) the lines often overlap with other
change lines.

Please play with this a bit. I would prefer for both the old and new blocks to
always be centered in their respective panes. This would let my eyes rest on the
center of screen rather than having to look up and down repeatedly, and it would
ensure that the blocks were reasonably well aligned.
Comment 1 Maros Sandor 2007-03-27 15:36:40 UTC
I agree that when using Next/Previous Difference actions the selected difference
should be completely visible on both sides and aligned (if possible). I'll try
to tune the scrolling engine and if that fails then hardcoding it to treat
Next/Previous actions and Scrollbar differently. I'd appreciate if you give an
example (file revisions) when this behavior clearly manifests.
Comment 2 Jesse Glick 2007-03-27 18:21:30 UTC
I guess I don't have any particular example in mind; seems to happen
consistently for all sorts of changes I make. Next time I am doing a diff I
could attach some screenshots if that would be helpful. Probably changes which
involve adding or deleting significant blocks of code would show it more, since
then the line numbers are out of synch between the old and new buffers.
Comment 3 Jesse Glick 2007-03-27 18:23:20 UTC
Created attachment 40050 [details]
Screenshot showing misaligned diff blocks (still all on screen; no off-screen problems in this diff)
Comment 4 Jesse Glick 2007-03-31 02:29:54 UTC
Created attachment 40230 [details]
Screenshot showing even more misaligned diff
Comment 5 Maros Sandor 2007-10-01 14:32:31 UTC
Should be better now.

/shared/data/ccvs/repository/diff/src/org/netbeans/modules/diff/builtin/visualizer/editable/EditableDiffView.java,v  <--
 EditableDiffView.java
new revision: 1.24; previous revision: 1.23
Comment 6 Jesse Glick 2007-10-23 18:52:45 UTC
Created attachment 51522 [details]
Screenshot from dev build
Comment 7 Jesse Glick 2007-10-23 18:55:06 UTC
Doesn't seem any better; see recent screenshot. In this case the scrollbar is at the bottom despite the fact that the
old text is not completely visible. The only way to see what code is being replaced is to put the cursor in the left
editor pane and move it down with arrow keys. In such a case the active diff block is reset to be one further up; after
pressing Ctrl-. the end of the old file is hidden again. Generally, I am having the same kind of problems I was having
before, so I'm not sure what was fixed.
Comment 8 Jesse Glick 2007-10-23 21:06:57 UTC
I should also mention that Ctrl-. very frequently skips over one or more diff blocks, so that I will often press Ctrl-.
while in one file and find myself 2/3 of the way down into another file. (Ctrl-, seems to reliably go backward one diff
block at a time.) Overall, very irritating - I am never sure that I have actually seen all of the changes I made.
Comment 9 Alexander Kouznetsov 2008-01-22 17:51:59 UTC
Completely agree with jglick, got the same sort of misbehavior.
Comment 10 Maros Sandor 2008-03-05 13:28:31 UTC
I have made additional improvements during recent months, please verify.
Comment 11 Jesse Glick 2008-03-05 17:01:29 UTC
Created attachment 57822 [details]
Screenshot using current sources
Comment 12 Jesse Glick 2008-03-05 17:04:06 UTC
Perhaps better than it was, but still fails to scroll to show the entire modified region in many common cases. Just try
inserting or deleting half-screen-sized blocks of text randomly and browse diffs; scrolling is definitely less than optimal.
Comment 13 Jesse Glick 2011-06-06 16:24:47 UTC
Still quite bad, often unusable.
Comment 14 Jesse Glick 2011-10-19 15:10:12 UTC
Still bordering on unusable. Refactoring preview for Inspect & Transform, even something that does not add or remove lines - e.g. remove final modifier from static methods - will typically scroll to show old code on left side but show a completely different section of the new file on the right side.
Comment 15 Jesse Glick 2012-03-22 14:21:43 UTC
Same scrolling/centering problems persist. Also noticed that Ctrl-PERIOD often skips over some diff hunks; have to use Ctrl-COMMA several times to "back up" and hope that this will make the skipped hunk visible (but usually requires manual correction with scrollbars).


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo