diff options
author | johnsonj <unknown> | 2025-05-11 18:20:38 +1000 |
---|---|---|
committer | johnsonj <unknown> | 2025-05-11 18:20:38 +1000 |
commit | 61066182da826a8a1bd00673851931a8c200f637 (patch) | |
tree | 6565e798911ce2770753b6ab45a6c2fa64935a53 | |
parent | 220ff95d67d652dd5bc709ffed27cfb52c86d3fe (diff) | |
download | scintilla-mirror-61066182da826a8a1bd00673851931a8c200f637.tar.gz |
Feature [feature-requests:#1476]. Fix IME delete surrounding when tentative
composition active.
-rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
-rwxr-xr-x | gtk/ScintillaGTK.cxx | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 36b1f56f7..49b96aa2c 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -612,6 +612,10 @@ scroll position not restored in non-wrap mode. <a href="https://sourceforge.net/p/scintilla/bugs/2416/">Bug #2416</a>. </li> + <li> + On GTK, fix IME problem when tentative composition interfered with delete surrounding. + <a href="https://sourceforge.net/p/scintilla/feature-requests/1476/">Feature #1476</a>. + </li> </ul> <h3> <a href="https://www.scintilla.org/scintilla556.zip">Release 5.5.6</a> diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 2985aab54..4c71d4a7e 100755 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -2619,6 +2619,10 @@ gboolean ScintillaGTK::RetrieveSurrounding(GtkIMContext *context, ScintillaGTK * bool ScintillaGTK::DeleteSurroundingThis(GtkIMContext *, gint characterOffset, gint characterCount) { try { + if (pdoc->TentativeActive()) { + // First remove composition text so that correct surrounding text is deleted. + pdoc->TentativeUndo(); + } const Sci::Position startByte = pdoc->GetRelativePosition(CurrentPosition(), characterOffset); if (startByte == INVALID_POSITION) return false; |