From 4b62baf85e53ef021ab8c5000b929622f0dddee5 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 3 Feb 2002 02:57:45 +0000 Subject: Patch to ensure caret on after mouse wheel scroll or pressing End when already at line end. --- src/Editor.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index 461460f69..613cd0a1e 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -745,14 +745,15 @@ void Editor::EnsureCaretVisible(bool useMargin, bool vert, bool horiz) { } void Editor::ShowCaretAtCurrentPosition() { - if (!hasFocus) { + if (hasFocus) { + caret.active = true; + caret.on = true; + SetTicking(true); + } else { caret.active = false; caret.on = false; - return; } - caret.active = true; - caret.on = true; - SetTicking(true); + InvalidateCaret(); } void Editor::DropCaret() { @@ -3536,7 +3537,6 @@ void Editor::SetFocusState(bool focusState) { NotifyFocus(hasFocus); if (hasFocus) { ShowCaretAtCurrentPosition(); - InvalidateCaret(); } else { DropCaret(); } -- cgit v1.2.3