aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk/ScintillaGTK.cxx
diff options
context:
space:
mode:
authorjohnsonj <unknown>2025-05-16 12:12:13 +1000
committerjohnsonj <unknown>2025-05-16 12:12:13 +1000
commitaefa36e90bb7d11881138ec6acd82f245f2c346d (patch)
tree4b2f02a427bb3ad699b512f20aaae6308b0e3a54 /gtk/ScintillaGTK.cxx
parenta9d050f5145f572542c986f1bcdcdf1c3514f1e9 (diff)
downloadscintilla-mirror-aefa36e90bb7d11881138ec6acd82f245f2c346d.tar.gz
Feature [feature-requests:#1488]. Update IME cursor position inside retrieve
surrounding to better position candidate window.
Diffstat (limited to 'gtk/ScintillaGTK.cxx')
-rwxr-xr-xgtk/ScintillaGTK.cxx7
1 files changed, 7 insertions, 0 deletions
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;