From d51beee2ede9d640e25eaf3b215acb7638ba707d Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 11 Apr 2018 10:39:50 +1000 Subject: Backport: Set the last X chosen when SCI_REPLACESEL called to ensure macros work when text insertion followed by line up or down. Backport of changeset 6679:480de02f71f2. --- doc/ScintillaHistory.html | 4 ++++ src/Editor.cxx | 1 + 2 files changed, 5 insertions(+) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index f4c5ce4e6..a0fc4f2b6 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -539,6 +539,10 @@ Released ?.
  • + Set the last X chosen when SCI_REPLACESEL called to ensure macros work + when text insertion followed by caret up or down. +
  • +
  • On Win32, a new file, ScintillaDLL.cxx, provides the DllMain function required for a stand-alone Scintilla DLL. Build and project files should include this file when producing a DLL and omit it when producing a static library or linking Scintilla statically. diff --git a/src/Editor.cxx b/src/Editor.cxx index 27eb840ad..708210e27 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -5948,6 +5948,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { const Sci::Position lengthInserted = pdoc->InsertString( sel.MainCaret(), replacement, istrlen(replacement)); SetEmptySelection(sel.MainCaret() + lengthInserted); + SetLastXChosen(); EnsureCaretVisible(); } break; -- cgit v1.2.3