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 182323 - [69cat] diff screen jumps back to cursor position
Summary: [69cat] diff screen jumps back to cursor position
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P4 normal with 1 vote (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on: 190812
Blocks:
  Show dependency tree
 
Reported: 2010-03-18 17:13 UTC by ulfzibis
Modified: 2016-07-07 07:26 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ulfzibis 2010-03-18 17:13:07 UTC
[ BUILD # : 6.8, sorry ]
[ JDK VERSION : 1.6.* ]

If I have cursor on right pane in tools diff view, then srcoll some pages down,
hit some "Insert" arrow icon, page scrolls up to old cursor position.
Comment 1 Vitezslav Stejskal 2010-03-24 10:50:56 UTC
What exactly do you mean by '"Insert" arrow icon'? Do you mean the symbols for reverting each particular change in the diffed document? If so, then this seems to be reproducible in a 6.9dev build.
Comment 2 ulfzibis 2010-03-25 11:56:29 UTC
Yes, you are right, except I can't agree the term "reverting", as it only fits for the versioning diff case, but here we are on tools diff case, although I must add, that the annoying behaviour should be fixed for versioning diff too.
Comment 3 Ondrej Vrabec 2010-10-04 13:58:00 UTC
IMHO this should be fixed in editor. The diff does not scroll to the cursor position.
The same happens in a regular editor when you modify a file externally.
1) Open a java file
2) Set cursor to the first line
3) Scroll down to the end of the file
4) Switch to commandline and modify the file here.
5) Switch back to the IDE. The editor will scroll back to the first line.

Please evaluate.
Comment 4 David Strupl 2010-10-04 14:02:31 UTC
Aha, I see. We scroll on modification so that cursor is visible. Is this a problem?

Milo, can you please help me to evaluate this? Thanks.
Comment 5 Miloslav Metelka 2010-10-06 15:40:36 UTC
If I understand the problem correctly:
1) Cursor is e.g. at the file begining.
2) Document's view gets scrolled down to some position.
3) Clicking the button performs insert(s)/removal(s) somewhere around the scrolled position.
4) The view gets scrolled up so that the caret is visible.

We could possibly handle non-external-modification case but unless issue 190812 gets implemented in platform/text we will not be able to handle the problem completely.
Comment 6 ulfzibis 2010-10-07 11:40:41 UTC
(In reply to comment #3)
> The same happens in a regular editor when you modify a file externally.
In this case, it's maybe acceptable that (1) caret goes to 1. line, and (2) page is scrolled up.
(1) there should be some reasonable logic where to set the caret in case of external change.
(2) there should be some reasonable logic where to scroll the page in case of external change. Maybe percentaged against the total line-count of the document.
IMHO this should be treated by a separate issue.

But in case of the diff view, current behaviour unreasonably interferes the work-flow when merging between the diffed documents.
Comment 7 Martin Balin 2016-07-07 07:26:34 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss