mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Set the cursor x at the same time as changing the y or the end of line
marker may not be redrawn.
This commit is contained in:
parent
3e72e98e3b
commit
26b9a8e49b
@ -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)
|
if (data->lineflag == LINE_SEL_LEFT_RIGHT && oy == data->sely)
|
||||||
window_copy_other_end(wme);
|
window_copy_other_end(wme);
|
||||||
|
|
||||||
data->cx = data->lastcx;
|
|
||||||
if (scroll_only || data->cy == 0) {
|
if (scroll_only || data->cy == 0) {
|
||||||
|
data->cx = data->lastcx;
|
||||||
window_copy_scroll_down(wme, 1);
|
window_copy_scroll_down(wme, 1);
|
||||||
if (scroll_only) {
|
if (scroll_only) {
|
||||||
if (data->cy == screen_size_y(s) - 1)
|
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);
|
window_copy_redraw_lines(wme, data->cy, 2);
|
||||||
}
|
}
|
||||||
} else {
|
} 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 (window_copy_update_selection(wme, 1)) {
|
||||||
if (data->cy == screen_size_y(s) - 1)
|
if (data->cy == screen_size_y(s) - 1)
|
||||||
window_copy_redraw_lines(wme, data->cy, 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)
|
if (data->lineflag == LINE_SEL_RIGHT_LEFT && oy == data->endsely)
|
||||||
window_copy_other_end(wme);
|
window_copy_other_end(wme);
|
||||||
|
|
||||||
data->cx = data->lastcx;
|
|
||||||
if (scroll_only || data->cy == screen_size_y(s) - 1) {
|
if (scroll_only || data->cy == screen_size_y(s) - 1) {
|
||||||
|
data->cx = data->lastcx;
|
||||||
window_copy_scroll_up(wme, 1);
|
window_copy_scroll_up(wme, 1);
|
||||||
if (scroll_only && data->cy > 0)
|
if (scroll_only && data->cy > 0)
|
||||||
window_copy_redraw_lines(wme, data->cy - 1, 2);
|
window_copy_redraw_lines(wme, data->cy - 1, 2);
|
||||||
} else {
|
} 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 (window_copy_update_selection(wme, 1))
|
||||||
window_copy_redraw_lines(wme, data->cy - 1, 2);
|
window_copy_redraw_lines(wme, data->cy - 1, 2);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user