aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-05-05 09:34:24 +1000
committerNeil <nyamatongwe@gmail.com>2021-05-05 09:34:24 +1000
commit9b8ce7d9a3b7cbfe1a56fdb422f9e91b8f3ece14 (patch)
tree70423c5e4422778e708df92d92021de7a76d002a /src/Editor.cxx
parentaecda22f08cfe2c137c7f6fb8d8669e91426f4b2 (diff)
downloadscintilla-mirror-9b8ce7d9a3b7cbfe1a56fdb422f9e91b8f3ece14.tar.gz
Redraw when focus changes. Move hasFocus to EditModel where it can be used for
drawing more easily.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx5
1 files changed, 4 insertions, 1 deletions
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();