mirror of
https://github.com/tmux/tmux.git
synced 2024-11-04 18:08:48 +00:00
Calculate last position correctly for UTF-8 wide characters, reported by
Matthias Lederhofer.
This commit is contained in:
parent
eeaf92ad06
commit
299a8fd4a3
5
tty.c
5
tty.c
@ -969,7 +969,10 @@ tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx)
|
|||||||
* move as far left as possible and redraw the last
|
* move as far left as possible and redraw the last
|
||||||
* cell to move into the last position.
|
* cell to move into the last position.
|
||||||
*/
|
*/
|
||||||
cx = screen_size_x(s) - width;
|
if (ctx->last_cell.flags & GRID_FLAG_UTF8)
|
||||||
|
cx = screen_size_x(s) - ctx->last_utf8.width;
|
||||||
|
else
|
||||||
|
cx = screen_size_x(s) - 1;
|
||||||
tty_cursor_pane(tty, ctx, cx, ctx->ocy);
|
tty_cursor_pane(tty, ctx, cx, ctx->ocy);
|
||||||
tty_cell(tty, &ctx->last_cell, &ctx->last_utf8);
|
tty_cell(tty, &ctx->last_cell, &ctx->last_utf8);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user