From 6ade22b5c6934ae99fd673cc19e314ffcd537c9b Mon Sep 17 00:00:00 2001 From: martin Date: Sat, 3 Mar 2012 20:14:11 +0000 Subject: [PATCH] SynEdit: Fixed eoNoCaret git-svn-id: trunk@35689 - --- components/synedit/synedit.pp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/components/synedit/synedit.pp b/components/synedit/synedit.pp index b46d8cd08b..ccae846444 100644 --- a/components/synedit/synedit.pp +++ b/components/synedit/synedit.pp @@ -4456,7 +4456,7 @@ begin DebugLn(['[TCustomSynEdit.WMSetFocus] A ',Name,':',ClassName, ' time=', dbgs(Now*86640)]); {$ENDIF} FScreenCaret.DestroyCaret; // Ensure recreation. On Windows only one caret exists, and it must be moved to the focused editor - FScreenCaret.Visible := True; + FScreenCaret.Visible := not(eoNoCaret in FOptions); //if FHideSelection and SelAvail then // Invalidate; inherited; @@ -7220,10 +7220,12 @@ begin // (un)register HWND as drop target if (eoDropFiles in ChangedOptions) and not (csDesigning in ComponentState) and HandleAllocated then ; // ToDo DragAcceptFiles - if (eoPersistentCaret in ChangedOptions) and HandleAllocated then begin + if (ChangedOptions * [eoPersistentCaret, eoNoCaret] <> []) and HandleAllocated then begin UpdateCaret; - if not Focused then - FScreenCaret.Visible := (eoPersistentCaret in FOptions); + if Focused then + FScreenCaret.Visible := not(eoNoCaret in FOptions) + else + FScreenCaret.Visible := (eoPersistentCaret in FOptions) and not(eoNoCaret in FOptions); end; if (eoShowSpecialChars in ChangedOptions) then begin if eoShowSpecialChars in FOptions