updated on Sat Jan 21 16:18:39 UTC 2012
[aur-mirror.git] / rxvt-unicode-better-wheel-scrolling / clear.patch
blob0b72b6b99359e997afcf155ce4cc76022400ba9f
1 diff -r 4399ffb6a87c src/command.C
2 --- a/src/command.C Sat Jan 21 13:57:22 2012 +0100
3 +++ b/src/command.C Sat Jan 21 14:03:49 2012 +0100
4 @@ -2932,6 +2932,17 @@
6 case CSI_CUP: /* 8.3.21: (1,1) CURSOR POSITION */
7 case CSI_HVP: /* 8.3.64: (1,1) CHARACTER AND LINE POSITION */
8 + if (nargs == 1 && current_screen == 0)
9 + {
10 + // This is usually followed with clear screen so add some extra
11 + // lines to avoid deleting the lines already on screen. If we are
12 + // already at the top, add an extra screen height of lines.
13 + int extra_lines = nrow-1;
14 + if (screen.cur.row == 0)
15 + extra_lines += nrow;
16 + for (int i = 0; i < extra_lines; ++i)
17 + scr_add_lines (L"\r\n", 2);
18 + }
19 scr_gotorc (arg[0] - 1, nargs < 2 ? 0 : (arg[1] - 1), 0);
20 break;