From 554dc6a20cc1f0494ae7035e3cb03d632edbef83 Mon Sep 17 00:00:00 2001 From: Justin Dailey Date: Fri, 7 Jul 2017 12:55:23 +1000 Subject: 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. --- doc/ScintillaHistory.html | 5 +++++ src/Editor.cxx | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index b654f0ed9..dafd6d9ab 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -565,6 +565,11 @@ Bug #1919.
  • + 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. +
  • +
  • Fix drawing failure when in wrap mode for delete to start/end of line which affects later lines but did not redraw them. Bug #1949. diff --git a/src/Editor.cxx b/src/Editor.cxx index 2294105b2..740e230f8 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 @@ -7637,7 +7636,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: -- cgit v1.2.3