Files
LLeMbas-TTY/docs/config/lua/window/composition_status.md
T
Wez Furlong 627001762e rename dead_key_is_active -> composition_status, dead_key_cursor -> compose_cursor
Since the composition state isn't strictly tied to dead keys, use
a name that better reflects that.
2022-01-09 08:39:21 -07:00

33 lines
786 B
Markdown

# wezterm:composition_status()
*Since: nightly builds only*
Returns a string holding the current dead key or IME composition text,
or `nil` if the input layer is not in a composition state.
This is the same text that is shown at the cursor position when composing.
This example shows how to show the composition status in the status area.
The cursor color is also changed to `orange` when in this state.
```lua
local wezterm = require 'wezterm';
wezterm.on("update-right-status", function(window, pane)
local compose = window:composition_status()
if compose then
compose = "COMPOSING: " .. compose
end
window:set_right_status(compose)
end);
return {
colors = {
compose_cursor = "orange",
},
}
```
See also: [window:leader_is_active()](leader_is_active.md).