"Always visible Caret" does not work, if caret was invisible already
Original Reporter info from Mantis: Martin @martin_frb
-
Reporter name: Martin Friebe
Original Reporter info from Mantis: Martin @martin_frb
- Reporter name: Martin Friebe
Description:
- Start lazarus without "Always visible Caret".
- Scroll the cursor out of the visible Area.
- Change the editor options and set "Always visible Caret" to true
- changing the option does not bring the Caret into the visible Area
- worse: Even if you scroll (scrollbars/mouse wheel), the Caret is still not showing up
- The caret also stops responding to cursor Keys
Without the option, if the caret is outside the visible Editor area, trying to move the Caret (cursor keys) will make the editor's view jump to the caret.
This does no longer happen (just from setting the option while the caret was outside the visible area. Even if you did not scroll after setting the option.
Additional information:
Experienced under Windows Vista, with 0.9.24 and SVN.
Not sure if related, but certainly of interest for the following issues. As those issues only occur, if the option is on, and the caret actually visible.
#11145 (closed) #8479 (closed) #10905 (closed)
I am not sure if the following bits of code are related, but they may be:
in components/synedit//synedit.pp there is a mix of checks to fOptions and fOptions2
procedure TCustomSynEdit.UpdateCaret;
if (PaintLock <> 0)
{$IFDEF SYN_LAZARUS}
or ((not Focused) and (not (eoPersistentCaret in fOptions)))
{$ELSE}
or not Focused
{$ENDIF}
then
Include(fStateFlags, sfCaretChanged)
else begin
Exclude(fStateFlags, sfCaretChanged);
{$IFDEF SYN_LAZARUS}
if eoAlwaysVisibleCaret in fOptions2 then
MoveCaretToVisibleArea;
{$ENDIF}
Mantis conversion info:
- Mantis ID: 11178
- Version: 0.9.25 (SVN)
- Fixed in version: 0.9.27 (SVN)
- Fixed in revision: 18083 (#0e0fb14c)
- Target version: 1.0.0
- LazTarget: 1.0