diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2012-03-11 23:01:20 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2012-03-11 23:01:20 +0000 |
commit | 5677545d80155bf4ed1ceddbf2ad94997708f950 (patch) | |
tree | ecf3b2994df9d441edef8f911b70257f637d2875 /usr.bin | |
parent | 74b3da6da335ede556435cafe8d39fa4272f2e85 (diff) |
Always remember last cursor position when moving up or down, not just
for if crossing zero length lines. From Itay Perl.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/window-copy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/window-copy.c b/usr.bin/tmux/window-copy.c index f376c204652..ed4232a091a 100644 --- a/usr.bin/tmux/window-copy.c +++ b/usr.bin/tmux/window-copy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-copy.c,v 1.76 2011/12/04 16:18:01 nicm Exp $ */ +/* $OpenBSD: window-copy.c,v 1.77 2012/03/11 23:01:19 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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; } |