Bug 570763 - StyledText: allow to show/hide caret from outside
Summary: StyledText: allow to show/hide caret from outside
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.18   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-29 11:47 EST by Thomas Singer CLA
Modified: 2021-01-29 11:47 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Singer CLA 2021-01-29 11:47:32 EST
It should be possible to show or hide the caret even when moving with cursor keys, e.g. for lines that show content that does not contain document text but some other overlay. styledText.getCaret().setVisible(visible) is not sufficient because it is quickly overwritten by StyledText.updateCaretVisibility, e.g. after having pressed a cursor key.

IMHO it should be and-combined with the current visibility. The caret should only become visible if enabled from outside (new method suggestion: setCaretVisible) and from its internal state, e.g. block selection.