diff --git a/src/apprt/gtk/Surface.zig b/src/apprt/gtk/Surface.zig index de0a8f812..936076e55 100644 --- a/src/apprt/gtk/Surface.zig +++ b/src/apprt/gtk/Surface.zig @@ -1935,6 +1935,14 @@ fn gtkInputPreeditChanged( ) callconv(.C) void { const self = userdataSelf(ud.?); + // Any preedit change should mark that we're composing. Its possible this + // is false using fcitx5-hangul and typing "dkssud" ("안녕"). The + // second "s" results in a "commit" for "안" which sets composing to false, + // but then immediately sends a preedit change for the next symbol. With + // composing set to false we won't commit this text. Therefore, we must + // ensure it is set here. + self.im_composing = true; + // Get our pre-edit string that we'll use to show the user. var buf: [*c]u8 = undefined; _ = c.gtk_im_context_get_preedit_string(ctx, &buf, null, null);