mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
render: ime: adjust cursor cell index when adjusting glyph offset
This commit is contained in:
parent
d46dcd8ef5
commit
bcfc468fd0
1 changed files with 4 additions and 1 deletions
5
render.c
5
render.c
|
|
@ -2219,9 +2219,12 @@ render_search_box(struct terminal *term)
|
|||
}
|
||||
|
||||
/* Move offset if there is free space available */
|
||||
if (total_cells - glyph_offset < visible_cells)
|
||||
if (total_cells - glyph_offset < visible_cells) {
|
||||
ssize_t old = glyph_offset;
|
||||
term->render.search_glyph_offset = glyph_offset =
|
||||
total_cells - min(total_cells, visible_cells);
|
||||
cursor_cell_idx += old - (ssize_t)glyph_offset;
|
||||
}
|
||||
|
||||
/*
|
||||
* Render the search string, starting at ‘glyph_offset’. Note that
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue