diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2012-03-11 23:01:19 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2012-03-11 23:01:19 +0000 |
commit | 1bbb7932636799b99acbd95dbf845872606412ab (patch) | |
tree | 9fc2aabf3ad17d9fb80be2a19beeec1499b111bd | |
parent | 799f437effd83d8aaf03c82919e5acfbfa79230f (diff) | |
download | rtmux-1bbb7932636799b99acbd95dbf845872606412ab.tar.gz rtmux-1bbb7932636799b99acbd95dbf845872606412ab.tar.bz2 rtmux-1bbb7932636799b99acbd95dbf845872606412ab.zip |
Always remember last cursor position when moving up or down, not just
for if crossing zero length lines. From Itay Perl.
-rw-r--r-- | window-copy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/window-copy.c b/window-copy.c index 3ba11f2a..3d491822 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; } |