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 161701 - Lines programmatically inserted above the caret position should not change the scroll position
Summary: Lines programmatically inserted above the caret position should not change th...
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
: 167375 170091 170572 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-01 19:26 UTC by _ tboudreau
Modified: 2009-11-05 14:20 UTC (History)
5 users (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 _ tboudreau 2009-04-01 19:26:46 UTC
Compare Fix Imports in IntelliJ and NetBeans.

In IntelliJ, when you fix imports, the editor does not scroll - it does not visibly change at all.

In NetBeans, for every added import line, the caret line gets scrolled lower.  This is an annoying intrusion - I have to
reorient where I am looking in the editor.

There should be a general way that when text is programmatically inserted above the caret line, the scroll position of
the editor does not change.

This combined with fixing issue 161700 would make a subtle but important improvement in terms of the IDE breaking user
workflow.
Comment 1 Vitezslav Stejskal 2009-04-06 12:08:48 UTC
Sounds reasonable, although I have no idea how hard that would to fix.
Comment 2 Miloslav Metelka 2009-04-06 14:50:05 UTC
I can fix it in BaseCaret IMO.
Comment 3 mslama 2009-07-07 13:04:29 UTC
*** Issue 167375 has been marked as a duplicate of this issue. ***
Comment 4 mslama 2009-07-07 13:08:45 UTC
Issue #167375 is about moving scrolling position after applying code folding when file is opened. For example when
initial comment is set to collapsed and user uses Find to find any string and then opens some file. File is opened and
displayed, scrolling position is correct but after a while initial comment is collapsed somewhere above out of sight and
document is scrolled and caret is no longer visible.
Comment 5 mslama 2009-08-20 09:54:29 UTC
*** Issue 170572 has been marked as a duplicate of this issue. ***
Comment 6 Victor Vasilyev 2009-09-16 02:32:33 UTC
*** Issue 170091 has been marked as a duplicate of this issue. ***
Comment 7 Victor Vasilyev 2009-09-16 02:42:21 UTC
Issue 170091 is about a conflict between folding and navigation to the editor window after double-click on an item in
the Usages window. 
Comment 8 Quality Engineering 2009-11-05 10:18:56 UTC
Integrated into 'main-golden', will be available in build *200911050201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a99f19922716
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #161701 - Lines programmatically inserted above the caret position should not change the scroll position. - fixing imports should not change caret's relative position to scrollable view bounds.
Comment 9 Miloslav Metelka 2009-11-05 14:20:57 UTC
Fixed.