From 9b8ce7d9a3b7cbfe1a56fdb422f9e91b8f3ece14 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 5 May 2021 09:34:24 +1000 Subject: Redraw when focus changes. Move hasFocus to EditModel where it can be used for drawing more easily. --- src/Editor.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Editor.cxx') diff --git a/src/Editor.cxx b/src/Editor.cxx index adc9f3492..59d5d54e6 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -122,7 +122,6 @@ Editor::Editor() : durationWrapOneLine(0.00001, 0.000001, 0.0001) { cursorMode = SC_CURSORNORMAL; - hasFocus = false; errorStatus = 0; mouseDownCaptures = true; mouseWheelCaptures = true; @@ -5072,7 +5071,11 @@ void Editor::FineTickerCancel(TickReason) { } void Editor::SetFocusState(bool focusState) { + const bool changing = hasFocus != focusState; hasFocus = focusState; + if (changing) { + Redraw(); + } NotifyFocus(hasFocus); if (!hasFocus) { CancelModes(); -- cgit v1.2.3