diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-12-03 17:39:34 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-12-07 19:44:10 +0000 |
| commit | 83d3ae10aeea5ac7d451d789891542a1964c3faf (patch) | |
| tree | 7cd0415c2f0b605a89a3e6a0b7bc7e723ee9e4a0 | |
| parent | render: ime: calculate on-screen cursor position ourselves (diff) | |
render: ime: don’t render cursor if cursor begin == end
| -rw-r--r-- | render.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1093,9 +1093,10 @@ render_ime_preedit(struct terminal *term, struct buffer *buf) } /* Hollow cursor */ - if (!term->ime.preedit.cursor.hidden) { - int start = term->ime.preedit.cursor.start; - int end = term->ime.preedit.cursor.end; + int start = term->ime.preedit.cursor.start; + int end = term->ime.preedit.cursor.end; + + if (!term->ime.preedit.cursor.hidden && end > start) { pixman_color_t fg = color_hex_to_pixman(term->colors.fg); pixman_color_t bg = color_hex_to_pixman(term->colors.bg); |
