Bug 570763

Summary: StyledText: allow to show/hide caret from outside
Product: [Eclipse Project] Platform Reporter: Thomas Singer <ts-swt>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 4.18   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:

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.