Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337889

Summary: StyledText cuts off caret at right edge
Product: [Eclipse Project] Platform Reporter: Doug M <eclipse>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: major    
Priority: P3 CC: lshanmug
Version: 4.1Keywords: triaged
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard: stalebug
Attachments:
Description Flags
Tester that shows the problem. See steps to reproduce. none

Description Doug M CLA 2011-02-22 14:48:30 EST
Build Identifier: swt-3.7M5-cocoa-macosx-x86_64

At certain widths, the cursor disappears when placed at the right end of a line of wrapped text. For a single line ragged right, the caret disappears at about 10% of widths; for right justified at over half the widths. The problem is more frequent with monospaced fonts.

As it does correctly at the left edge, StyledText should wrap such that there is always room to see the caret when it is placed at the right edge. This is the native text editing behavior for Mac and Windows.

I am marking this a serious bug because my my users won't tolerate the caret disappearing without reason while typing, formatting, and editing.

Note that this bug has nothing to do with computeSize, which always returns a width one pixel larger than the width specified. Increasing the width by 1 will only cause the caret to disappear in a different line.


Reproducible: Always

Steps to Reproduce:
1. Run the uploaded modified version of Snippet163. The z key reduces the width by 1; x increases by 1; c sets the text area to computeSize for the current width. The width changes are printed to console.
2. Place the caret at the right edge of a line. 
3. Shrink the text area using z until the caret disappears.
Comment 1 Doug M CLA 2011-02-22 14:50:37 EST
Created attachment 189535 [details]
Tester that shows the problem. See steps to reproduce.
Comment 2 Lakshmi P Shanmugam CLA 2017-07-03 07:45:59 EDT
Bug triaged, visit https://wiki.eclipse.org/SWT/Devel/Triage for more
information.
Comment 3 Eclipse Genie CLA 2020-05-25 18:04:54 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.