diff options
author | Mitchell Foral <unknown> | 2023-01-25 22:44:17 +1100 |
---|---|---|
committer | Mitchell Foral <unknown> | 2023-01-25 22:44:17 +1100 |
commit | 5736e5b866e1b291393829a3024374655d1cd55f (patch) | |
tree | 3fc2ac1b1bc3770c5a57a011d26f4076499096a1 | |
parent | bf5bf207cb43572fa887fd30cb92e960b2a949c8 (diff) | |
download | scintilla-mirror-5736e5b866e1b291393829a3024374655d1cd55f.tar.gz |
When an autocompletion list is shown in response to SCN_CHARADDED, do not
process character as fill-up or stop.
This avoids closing immediately when a character may both trigger and finish
autocompletion.
-rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
-rw-r--r-- | src/ScintillaBase.cxx | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 9bd4e2a44..f3253671a 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -594,6 +594,10 @@ Fix SCI_VERTICALCENTRECARET to update the vertical scroll position. </li> <li> + When an autocompletion list is shown in response to SCN_CHARADDED, do not process character as fill-up or stop. + This avoids closing immediately when a character may both trigger and finish autocompletion. + </li> + <li> On Cocoa fix character input bug where dotless 'i' and some other extended Latin characters could not be entered. The change also stops SCI_ASSIGNCMDKEY from working with these characters diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 571ffc8de..110e06489 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -78,11 +78,12 @@ void ScintillaBase::Finalise() { } void ScintillaBase::InsertCharacter(std::string_view sv, CharacterSource charSource) { - const bool isFillUp = ac.Active() && ac.IsFillUpChar(sv[0]); + const bool acActive = ac.Active(); + const bool isFillUp = acActive && ac.IsFillUpChar(sv[0]); if (!isFillUp) { Editor::InsertCharacter(sv, charSource); } - if (ac.Active()) { + if (acActive) { AutoCompleteCharacterAdded(sv[0]); // For fill ups add the character after the autocompletion has // triggered so containers see the key so can display a calltip. |