diff options
-rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
-rwxr-xr-x | gtk/ScintillaGTK.cxx | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index f82671db4..4d3c73774 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -624,6 +624,10 @@ 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> + <li> + On GTK, update IME cursor position inside retrieve surrounding to better position candidate window. + <a href="https://sourceforge.net/p/scintilla/feature-requests/1488/">Feature #1488</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 4c71d4a7e..3f8ce2d9e 100755 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -2604,6 +2604,13 @@ bool ScintillaGTK::RetrieveSurroundingThis(GtkIMContext *context) { std::string utf8Text = UTF8FromEncoded(RangeText(startByte, endByte)); gint cursorIndex = UTF8FromEncoded(RangeText(startByte, pos)).length(); + if (pdoc->TentativeActive()) { + // Prepare one line feed with no preedit under PreeditChangedInlineThis(); + } else { + // reconvert key triggers CandidateBox to show up + // when quick phrase input on fcitx (or maybe accented input on mac) + SetCandidateWindowPos(); + } gtk_im_context_set_surrounding(context, &utf8Text[0], utf8Text.length(), cursorIndex); return true; |