aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/Editor.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index b85055202..0fba257be 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -1333,7 +1333,9 @@ void Editor::ShowCaretAtCurrentPosition() {
void Editor::DropCaret() {
caret.active = false;
- FineTickerCancel(tickCaret);
+ if (FineTickerAvailable()) {
+ FineTickerCancel(tickCaret);
+ }
InvalidateCaret();
}
@@ -3290,7 +3292,6 @@ int Editor::KeyCommand(unsigned int iMessage) {
break;
case SCI_EDITTOGGLEOVERTYPE:
inOverstrike = !inOverstrike;
- DropCaret();
ShowCaretAtCurrentPosition();
ContainerNeedsUpdate(SC_UPDATE_CONTENT);
NotifyUpdateUI();
@@ -4678,12 +4679,10 @@ void Editor::FineTickerCancel(TickReason) {
void Editor::SetFocusState(bool focusState) {
hasFocus = focusState;
NotifyFocus(hasFocus);
- if (hasFocus) {
- ShowCaretAtCurrentPosition();
- } else {
+ if (!hasFocus) {
CancelModes();
- DropCaret();
}
+ ShowCaretAtCurrentPosition();
}
int Editor::PositionAfterArea(PRectangle rcArea) const {