Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314208 - [editor] Editor horizontal scrollbar jumping to the beginning of the line
Summary: [editor] Editor horizontal scrollbar jumping to the beginning of the line
Status: RESOLVED WORKSFORME
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal with 3 votes (vote)
Target Milestone: 3.5.1   Edit
Assignee: Chris Jaun CLA
QA Contact: Chris Jaun CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-25 03:54 EDT by Jacek Pospychala CLA
Modified: 2022-08-06 04:21 EDT (History)
4 users (show)

See Also:


Attachments
sample.js (326 bytes, application/x-javascript)
2010-05-25 03:55 EDT, Jacek Pospychala CLA
no flags Details
jumpingscrollbar.avi (626.50 KB, video/avi)
2010-05-25 03:58 EDT, Jacek Pospychala CLA
no flags Details
Simple js file to reproduce editing problem (1.03 KB, application/x-javascript)
2010-06-28 04:48 EDT, Jeroen ter Voorde CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jacek Pospychala CLA 2010-05-25 03:54:05 EDT
Using build 3.6M7

Under some circumstances, when editing long line that doesn't fit into window, scrollbar jumps to the start of the line, effectively hiding the cursor.

This happens only on some long lines, not all, and happens shortly after finishing typing. (Maybe is caused by some reconciler?)

Attaching a sample file to reproduce.
Comment 1 Jacek Pospychala CLA 2010-05-25 03:55:58 EDT
Created attachment 169778 [details]
sample.js

to reproduce:
1. open file in editor, make sure it shows up to 45 columns, so horizontal scrollbar shows up
2. put cursor in line 23, and start editing "replace("", "")"
Comment 2 Jacek Pospychala CLA 2010-05-25 03:58:17 EDT
Created attachment 169779 [details]
jumpingscrollbar.avi

how it looks in my editor
Comment 3 Jeroen ter Voorde CLA 2010-06-28 04:47:18 EDT
I can reproduce in 3.2 final (from helios release) using the attached source file (bug.js). Just type a space after one on the long lines with lalalalala in it. When removing the empty block after the block containing the long lines the problem disappears.
Comment 4 Jeroen ter Voorde CLA 2010-06-28 04:48:35 EDT
Created attachment 172870 [details]
Simple js file to reproduce editing problem
Comment 5 Chris Jaun CLA 2011-04-18 16:20:29 EDT
Well...figured out where this is happening:

TextViewer - line 4803
fTextWidget.replaceStyleRanges(region.getOffset(), region.getLength(), ranges);

Though, I have no idea why it is happening. The offset being used is wrong.
Comment 6 Victor Homyakov CLA 2012-04-25 09:15:58 EDT
I observe the similar behavior in JSP editor in two cases:
1. Editing long lines (especially typing JSP comments at the end of line)
2. Opening JSP with search occurrence on long line by double-clicking on search result in Search view.

Eclipse Java EE IDE for Web Developers.
Version: Indigo Service Release 2
Build id: 20120216-1857
Comment 7 Chris Jaun CLA 2013-07-22 10:30:29 EDT
I'm not really sure what fixed this problem, but I can reproduce in 3.5, but not 3.5.1.

The only thing that has gone in is the big performance fix in bug384319, so must have been something in there that cleaned this up.

Checked against the 7/18 build.