Store and restore cursor across reflow by working out a position based

on unwrapped lines, rather than a grid offset. Fixes problems reported
by Thomas Sattler and Paul de Weerd.
This commit is contained in:
nicm
2019-04-02 08:45:32 +00:00
parent 792fcb1dbf
commit ffa4d48967
3 changed files with 51 additions and 30 deletions

4
tmux.h
View File

@ -2101,8 +2101,8 @@ char *grid_string_cells(struct grid *, u_int, u_int, u_int,
void grid_duplicate_lines(struct grid *, u_int, struct grid *, u_int,
u_int);
void grid_reflow(struct grid *, u_int);
u_int grid_to_offset(struct grid *, u_int, u_int);
void grid_from_offset(struct grid *, u_int, u_int *, u_int *);
void grid_wrap_position(struct grid *, u_int, u_int, u_int *, u_int *);
void grid_unwrap_position(struct grid *, u_int *, u_int *, u_int, u_int);
/* grid-view.c */
void grid_view_get_cell(struct grid *, u_int, u_int, struct grid_cell *);