mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Store time lines are scrolled into history and display in copy mode.
This commit is contained in:
2
grid.c
2
grid.c
@ -399,6 +399,7 @@ grid_scroll_history(struct grid *gd, u_int bg)
|
||||
|
||||
gd->hscrolled++;
|
||||
grid_compact_line(&gd->linedata[gd->hsize]);
|
||||
gd->linedata[gd->hsize].time = current_time;
|
||||
gd->hsize++;
|
||||
}
|
||||
|
||||
@ -438,6 +439,7 @@ grid_scroll_history_region(struct grid *gd, u_int upper, u_int lower, u_int bg)
|
||||
|
||||
/* Move the line into the history. */
|
||||
memcpy(gl_history, gl_upper, sizeof *gl_history);
|
||||
gl_history->time = current_time;
|
||||
|
||||
/* Then move the region up and clear the bottom line. */
|
||||
memmove(gl_upper, gl_upper + 1, (lower - upper) * sizeof *gl_upper);
|
||||
|
Reference in New Issue
Block a user