summaryrefslogtreecommitdiffstats
path: root/grid.c
diff options
context:
space:
mode:
authornicm <nicm>2022-06-21 09:30:01 +0000
committernicm <nicm>2022-06-21 09:30:01 +0000
commit9c89f7c2af748858e784e8c533c548460bd6b10e (patch)
treeea324297eba8f5f8ecb2941a87736dcd847f3914 /grid.c
parenta888ce9963053c790c6ee9bf64cc53d95f0f9c09 (diff)
Store time lines are scrolled into history and display in copy mode.
Diffstat (limited to 'grid.c')
-rw-r--r--grid.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/grid.c b/grid.c
index 1109ac58..ba251e70 100644
--- a/grid.c
+++ b/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);