Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368926 - Editor's view jumps during selection
Summary: Editor's view jumps during selection
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2012-01-18 04:47 EST by Marvin Fröhlich CLA
Modified: 2018-05-16 11:41 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marvin Fröhlich CLA 2012-01-18 04:47:31 EST
Build Identifier: 20110916-0149

Example code:
###############################
sdkfj lkwjekwj sdfjsd wlkjelkwj sdlkfjskldfj wekrjweklrj sdf AAA werewrwer asd
Quick brown fox jumps over the lazy dog.
Long line of code, that I would like to select parts of together with other ones.
###############################

The editor width is number of # chars here. I place the caret left to the AAA and start selecting. I want to select everything from AAA to together (two lines below). It I select using the mouse only or SHIFT+arrow_keys, the editor will jump left, because of the shorter line in the middle. I cannot select, what I wanted to select without interrupting the selection, scrolling back to where I was and proceed the selection.

During a selection process the editor should always stay where it is unless I move the mouse or the caret to it's borders just like it is for the vertical case. It must never scroll horizontally just to show shorter lines. At least there should be a setting to make it behave.

Reproducible: Always
Comment 1 Marvin Fröhlich CLA 2012-01-18 04:50:20 EST
Btw. I know, that the caret moves out of the editor's borders. But you know, what I mean. I haven't explicitly moved it out of scope.
Comment 2 Dani Megert CLA 2012-01-18 05:30:41 EST
That's how all editors work that I know. Moving to SWT since this is StyledText behavior. I'd close this as WONTFIX.
Comment 3 Marvin Fröhlich CLA 2012-01-18 08:31:41 EST
This might be the behavior of most text editors. But don't we want eclipse to
be better? ;)

I've asked some colleagues. And they all agree, that this behavior always
sucked in any editor.
Comment 4 Dani Megert CLA 2012-01-18 08:34:30 EST
(In reply to comment #3)
> This might be the behavior of most text editors. But don't we want eclipse to
> be better? ;)

Sure, but loosing the context/caret is not better but worse.
Comment 5 Marvin Fröhlich CLA 2012-01-18 09:13:30 EST
Yes, you're loosing the caret, but not the context. The context is lost with
the current behavior. And this is exactly my point.
Comment 6 Felipe Heidrich CLA 2012-01-30 12:52:19 EST
The editor has to show the selection. Not showing the user what is happening does not make sense to me. Sorry. Closing as wont fix.
Comment 7 Marvin Fröhlich CLA 2012-01-31 04:36:08 EST
I think, you didn't get me. The point is, that I have scrolled to some excerpt for a reason. My scope is on the part of the text, that I am seeing atm. If the editor scrolls left when marking the second line, it may show, what's going on at exactly this time. But the context is completely lost andone line later I can't see, what should be going on, because I cannot select the text, that I want to select, because the editor accidentally scrolled away.

You simply can't show, what's going on at all times, because the right-most part of the text will be invisible, if you scroll left. So some parts of what happens will always be hidden. And what the use actually wants to see, is the text he scrolled to and that he obviously wants to select.

It would be an option to scroll left for the second line, but scroll back to the initial view when marking the third line.

Could you please at least make it a user preference not to scroll leave the scope in that situation? I think, it would help a lot of people.
Comment 8 Dani Megert CLA 2012-01-31 05:04:07 EST
> Could you please at least make it a user preference not to scroll leave the
> scope in that situation? I think, it would help a lot of people.

Sorry, this won't happen.
Comment 9 Eric Williams CLA 2018-05-16 11:41:07 EDT
Closing as per comment 8.