aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJustin Dailey <unknown>2017-07-07 12:55:23 +1000
committerJustin Dailey <unknown>2017-07-07 12:55:23 +1000
commit976e97303de40c6adc9f735c64b3a51b1c64b0c4 (patch)
tree4527a4d6fdf98d5e344f0da462c8dc62962daa43
parentc4a0a44a6c02d9ea78c8c8aebe58f81b06998f60 (diff)
downloadscintilla-mirror-976e97303de40c6adc9f735c64b3a51b1c64b0c4.tar.gz
Backport: Redraw when overtype changed so caret change visible even when not blinking.
Notify application with SC_UPDATE_SELECTION when overtype changed - previously sent SC_UPDATE_CONTENT. Backport of changeset 6337:79f86be9e988.
-rw-r--r--doc/ScintillaHistory.html5
-rw-r--r--src/Editor.cxx9
2 files changed, 11 insertions, 3 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 9e2452c06..89127953e 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -548,6 +548,11 @@
<a href="http://sourceforge.net/p/scintilla/bugs/1919/">Bug #1919</a>.
</li>
<li>
+ Ensure redraw when application changes overtype mode so caret change visible even when not blinking.
+ Notify application with SC_UPDATE_SELECTION when overtype changed - previously
+ sent SC_UPDATE_CONTENT.
+ </li>
+ <li>
Fix drawing failure when in wrap mode for delete to start/end of line which
affects later lines but did not redraw them.
<a href="http://sourceforge.net/p/scintilla/bugs/1949/">Bug #1949</a>.
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 5a200e952..a645478e0 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -3733,9 +3733,8 @@ int Editor::KeyCommand(unsigned int iMessage) {
break;
case SCI_EDITTOGGLEOVERTYPE:
inOverstrike = !inOverstrike;
+ ContainerNeedsUpdate(SC_UPDATE_SELECTION);
ShowCaretAtCurrentPosition();
- ContainerNeedsUpdate(SC_UPDATE_CONTENT);
- NotifyUpdateUI();
break;
case SCI_CANCEL: // Cancel any modes - handled in subclass
// Also unselect text
@@ -7635,7 +7634,11 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
}
case SCI_SETOVERTYPE:
- inOverstrike = wParam != 0;
+ if (inOverstrike != (wParam != 0)) {
+ inOverstrike = wParam != 0;
+ ContainerNeedsUpdate(SC_UPDATE_SELECTION);
+ ShowCaretAtCurrentPosition();
+ }
break;
case SCI_GETOVERTYPE: