ibus: the text before the cursor, and the runes to take back
RequireSurroundingText asks the client to send its text; it arrives through SetSurroundingText as an IBusText and a cursor counted in runes, and DeleteSurroundingText asks for runes back before the commit that replaces them. The official libibus client now proves the whole turn: 한자 typed, the Hanja key, Enter, and 漢字 arrives with the 한 taken away. A client that has set EffectivePostProcessKeyEvent is never asked for its text. It reads the key's commits back after ProcessKeyEvent returns, and a DeleteSurroundingText signal is not one of the things that reply can carry, so the deletion would land after the text it was meant to make room for and eat the wrong runes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -129,6 +129,7 @@ runcontract(char *address)
|
||||
"SetCapabilities",
|
||||
"SetCursorLocation",
|
||||
"SetCursorLocationRelative",
|
||||
"SetSurroundingText",
|
||||
};
|
||||
DBusConnection *conn;
|
||||
char path[96];
|
||||
|
||||
Reference in New Issue
Block a user