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.
Summary: | Bad scrolling behavior in diff window | ||
---|---|---|---|
Product: | utilities | Reporter: | Jesse Glick <jglick> |
Component: | Diff | Assignee: | Ondrej Vrabec <ovrabec> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | markiewb |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 246241 | ||
Attachments: |
Screenshot showing misaligned diff blocks (still all on screen; no off-screen problems in this diff)
Screenshot showing even more misaligned diff Screenshot from dev build Screenshot using current sources fully working I&T preview window weird scrolling |
Description
Jesse Glick
2007-03-27 00:52:48 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. 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. Created attachment 40050 [details]
Screenshot showing misaligned diff blocks (still all on screen; no off-screen problems in this diff)
Created attachment 40230 [details]
Screenshot showing even more misaligned diff
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 Created attachment 51522 [details]
Screenshot from dev build
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. 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. Completely agree with jglick, got the same sort of misbehavior. I have made additional improvements during recent months, please verify. Created attachment 57822 [details]
Screenshot using current sources
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. Still quite bad, often unusable. 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. 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). Created attachment 148026 [details] fully working I&T preview window (In reply to Jesse Glick from comment #11) > Created attachment 57822 [details] > Screenshot using current sources Is this really a problem? Where should it scroll, to the end of the file? I personally don't mind the current behavior, i simply scroll the left panel down to see the whole deleted hunk. (In reply to Jesse Glick from comment #12) > 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. Please can you attach an up-to-date screenshot and describe on that example? (In reply to Jesse Glick from comment #14) > 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. Can you reproduce? Seems to work fine for me in dev builds, see the attached screenshot... (In reply to Jesse Glick from comment #15) > 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). I do not experience this. Even if the hunks are really close to each other, next/prev always steps just to the closest neighbor, never skips any hunk. Created attachment 148027 [details]
weird scrolling
however i noticed a weird scrolling (not sure if the one you're talking about) - see the sc1.png - three active diff hunks. The screenshot shows that the middle hunk actually scrolls the left view to a higher line than the third one - which is obviously wrong and confusing. I'll try to do something with this at least.
i did what i could, i sincerely hope i didn't make it worse. fix: http://hg.netbeans.org/core-main/rev/d9cca502f2dc Integrated into 'main-silver', will be available in build *201407190718* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/d9cca502f2dc User: Ondrej Vrabec <ovrabec@netbeans.org> Log: #99059 - Bad scrolling behavior in diff window Improve jumping between current differences when scrolling. When scrolling the right panel differences are switched more smoothly and should now take into account the direction of scrolling. Do not recall seeing unreasonable behavior recently in dev builds. |