Correctly nuke the EOL $ marker when scrolling, reported by martynas@, thanks.

This commit is contained in:
Nicholas Marriott 2009-10-20 21:35:25 +00:00
parent 1af09d6330
commit 480f5d3184

View File

@ -1088,7 +1088,7 @@ window_copy_cursor_up(struct window_pane *wp, int scroll_only)
data->cx = data->lastcx; data->cx = data->lastcx;
if (scroll_only || data->cy == 0) { if (scroll_only || data->cy == 0) {
window_copy_scroll_down(wp, 1); window_copy_scroll_down(wp, 1);
if (scroll_only && window_copy_update_selection(wp)) if (scroll_only)
window_copy_redraw_lines(wp, data->cy, 2); window_copy_redraw_lines(wp, data->cy, 2);
} else { } else {
window_copy_update_cursor(wp, data->cx, data->cy - 1); window_copy_update_cursor(wp, data->cx, data->cy - 1);
@ -1119,7 +1119,7 @@ window_copy_cursor_down(struct window_pane *wp, int scroll_only)
data->cx = data->lastcx; data->cx = data->lastcx;
if (scroll_only || data->cy == screen_size_y(s) - 1) { if (scroll_only || data->cy == screen_size_y(s) - 1) {
window_copy_scroll_up(wp, 1); window_copy_scroll_up(wp, 1);
if (scroll_only && window_copy_update_selection(wp)) if (scroll_only && data->cy > 0)
window_copy_redraw_lines(wp, data->cy - 1, 2); window_copy_redraw_lines(wp, data->cy - 1, 2);
} else { } else {
window_copy_update_cursor(wp, data->cx, data->cy + 1); window_copy_update_cursor(wp, data->cx, data->cy + 1);
@ -1250,7 +1250,10 @@ window_copy_scroll_up(struct window_pane *wp, u_int ny)
screen_write_deleteline(&ctx, ny); screen_write_deleteline(&ctx, ny);
window_copy_write_lines(wp, &ctx, screen_size_y(s) - ny, ny); window_copy_write_lines(wp, &ctx, screen_size_y(s) - ny, ny);
window_copy_write_line(wp, &ctx, 0); window_copy_write_line(wp, &ctx, 0);
if (screen_size_y(s) > 1)
window_copy_write_line(wp, &ctx, 1); window_copy_write_line(wp, &ctx, 1);
if (screen_size_y(s) > 3)
window_copy_write_line(wp, &ctx, screen_size_y(s) - 2);
if (s->sel.flag && screen_size_y(s) > ny) if (s->sel.flag && screen_size_y(s) > ny)
window_copy_write_line(wp, &ctx, screen_size_y(s) - ny - 1); window_copy_write_line(wp, &ctx, screen_size_y(s) - ny - 1);
screen_write_cursormove(&ctx, data->cx, data->cy); screen_write_cursormove(&ctx, data->cx, data->cy);