diff --git a/window-copy.c b/window-copy.c index d81073bf..a7cb5dfa 100644 --- a/window-copy.c +++ b/window-copy.c @@ -3027,8 +3027,8 @@ window_copy_cursor_up(struct window_mode_entry *wme, int scroll_only) if (data->lineflag == LINE_SEL_LEFT_RIGHT && oy == data->sely) window_copy_other_end(wme); - data->cx = data->lastcx; if (scroll_only || data->cy == 0) { + data->cx = data->lastcx; window_copy_scroll_down(wme, 1); if (scroll_only) { if (data->cy == screen_size_y(s) - 1) @@ -3037,7 +3037,7 @@ window_copy_cursor_up(struct window_mode_entry *wme, int scroll_only) window_copy_redraw_lines(wme, data->cy, 2); } } else { - window_copy_update_cursor(wme, data->cx, data->cy - 1); + window_copy_update_cursor(wme, data->lastcx, data->cy - 1); if (window_copy_update_selection(wme, 1)) { if (data->cy == screen_size_y(s) - 1) window_copy_redraw_lines(wme, data->cy, 1); @@ -3077,13 +3077,13 @@ window_copy_cursor_down(struct window_mode_entry *wme, int scroll_only) if (data->lineflag == LINE_SEL_RIGHT_LEFT && oy == data->endsely) window_copy_other_end(wme); - data->cx = data->lastcx; if (scroll_only || data->cy == screen_size_y(s) - 1) { + data->cx = data->lastcx; window_copy_scroll_up(wme, 1); if (scroll_only && data->cy > 0) window_copy_redraw_lines(wme, data->cy - 1, 2); } else { - window_copy_update_cursor(wme, data->cx, data->cy + 1); + window_copy_update_cursor(wme, data->lastcx, data->cy + 1); if (window_copy_update_selection(wme, 1)) window_copy_redraw_lines(wme, data->cy - 1, 2); }