Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ibus input preview text not disappearing #2862

josswright opened this issue Jul 17, 2020 · 2 comments

ibus input preview text not disappearing #2862

josswright opened this issue Jul 17, 2020 · 2 comments


Copy link

I've just set up ibus with libpinyin input, and have it working everywhere except for a problem with kitty. I'm using the latest kitty-git package in Arch.

The problem I'm seeing is that when I type pinyin, I get ibus' preview window with the candidate text in it, but also a highlighted preview text in kitty. When I select the candidate text to 'commit' it to the window, it it is correctly added, but the highlighted 'preview' text previously shown doesn't disappear. This causes all sorts of problems when I resume typing related to the location of following text and the text cursor.

If I resize the window after the input, or clear the screen with <Ctrl+L>, the highlighted preview text disappears and only the correctly input text remains.

This sounds potentially similar to #1000 , but I'm not entirely sure.

It's quite confusing to explain, so here's a short screen recording (only of the kitty window, so it doesn't capture ibus' own preview window):


@josswright josswright added the bug label Jul 17, 2020
Copy link

I'm afraid i cant reproduce this behavior, though I did not try very
hard. try the following patch

diff --git a/kitty/keys.c b/kitty/keys.c
index 4bccc3ab..bf9e813b 100644
--- a/kitty/keys.c
+++ b/kitty/keys.c
@@ -146,6 +146,7 @@ on_key_input(GLFWkeyevent *ev) {
                 schedule_write_to_child(w->id, 1, text, strlen(text));
                 debug("committed pre-edit text: %s\n", text);
             } else debug("committed pre-edit text: (null)\n");
+            screen_draw_overlay_text(screen, NULL);
         case 0:
             // for macOS, update ime position on every key input

Copy link
Contributor Author

That fixed it! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants