From e678ba39437460a07afb2cbf8ce3b79e12bd475d Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Sun, 18 Mar 2012 01:35:39 +0000 Subject: [PATCH] Sync OpenBSD patchset 1046: Always remember last cursor position when moving up or down, not just for if crossing zero length lines. From Itay Perl. --- window-copy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/window-copy.c b/window-copy.c index a8b7d254..3ba650e2 100644 --- a/window-copy.c +++ b/window-copy.c @@ -1629,7 +1629,7 @@ window_copy_cursor_up(struct window_pane *wp, int scroll_only) oy = screen_hsize(data->backing) + data->cy - data->oy; ox = window_copy_find_length(wp, oy); - if (ox != 0) { + if (data->cx != ox) { data->lastcx = data->cx; data->lastsx = ox; } @@ -1671,7 +1671,7 @@ window_copy_cursor_down(struct window_pane *wp, int scroll_only) oy = screen_hsize(data->backing) + data->cy - data->oy; ox = window_copy_find_length(wp, oy); - if (ox != 0) { + if (data->cx != ox) { data->lastcx = data->cx; data->lastsx = ox; }