Bug 257238 - StyledText: block selection mode: trouble with caret and newline
Summary: StyledText: block selection mode: trouble with caret and newline
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 3.5 M4   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 19771
  Show dependency tree
 
Reported: 2008-12-02 12:50 EST by Dani Megert CLA
Modified: 2008-12-11 22:45 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2008-12-02 12:50:20 EST
I20081202-0800.

The block selection mode has troubles when I put the caret into a line and start typing: the small non-blinking caret stays (instead of the usual caret) - even after typing - and return does not working/is blocked.

Can be reproduced in SWT's TextEditor example.
Comment 1 Felipe Heidrich CLA 2008-12-02 14:51:19 EST
try clicking and clicking and dragging.
The thing you see that looks like a caret but doesn't blink is block selection rectangle with width==0.

If that makes a difference, we can change to use the regular caret when the width of the block selection is 0. But if you hold shift down and use arrow up or arrow down you will still have a zero width rectangle.

As for newline, it is by design. During block selection mode you can't enter newlines if the selection is up. This is important when you have a multi line selection.
Comment 2 Dani Megert CLA 2008-12-03 03:30:34 EST
>try clicking and clicking and dragging.
>The thing you see that looks like a caret but doesn't blink is block selection
>rectangle with width==0.
Yes, right, if you START DRAGGING the change of the look of the caret is OK and expected but when I set the caret into the editor by clicking the left mouse button then it should simply show the caret that's in the widget (either default or the custom caret that the editor has set).

>This is important when you have a multi line selection.
Exactly ;-) This bug says "has troubles when I put the caret into a line " ==> single line selection.
Comment 3 Felipe Heidrich CLA 2008-12-03 14:39:06 EST
Okay, point taken.
I'll fix this.
Comment 4 Felipe Heidrich CLA 2008-12-03 17:24:45 EST
Fixed in HEAD > 20081203
Comment 5 Dani Megert CLA 2008-12-04 02:30:17 EST
Thanks Felipe!