diff options
author | jjacky | 2012-04-30 16:32:49 +0200 |
---|---|---|
committer | Olivier Brunel | 2015-06-08 19:16:25 +0200 |
commit | 9e3204eec49808741cdea31546ded9696d6079b8 (patch) | |
tree | e994c4ed2ba064aa2d638b78ff31513e93d97563 | |
parent | f092105c05ccdd482dc7ba0f0898f3acf72beec4 (diff) | |
download | aur-9e3204eec49808741cdea31546ded9696d6079b8.tar.gz |
rxvt-unicode-better-wheel-scrolling: updated to new clear.patch
Signed-off-by: Olivier Brunel <jjk@jjacky.com>
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 8 | ||||
-rw-r--r-- | clear.patch | 64 |
3 files changed, 59 insertions, 19 deletions
@@ -1,7 +1,7 @@ pkgbase = rxvt-unicode-better-wheel-scrolling pkgdesc = An unicode enabled rxvt-clone terminal emulator (urxvt) w/ better wheel scrolling (VTE-like) (& no utmp/wtmp support) pkgver = 9.15 - pkgrel = 1 + pkgrel = 2 url = http://software.schmorp.de/pkg/rxvt-unicode.html arch = i686 arch = x86_64 @@ -18,11 +18,11 @@ pkgbase = rxvt-unicode-better-wheel-scrolling source = secondaryWheel.patch md5sums = 15595aa326167ac5eb68c28d95432faf md5sums = 3de6c13126a45bc3bc9f6bba077a1311 - md5sums = 8017fd25f177073c471dac7b9c063431 + md5sums = 061b851e89e53a71d1afad6947c51ca7 md5sums = ee638fc295bd563b9afd7e243e759c2c sha1sums = e6fdf091860ecb458730dc68b0176f67f207a2f7 sha1sums = 962aebc88982dbeb62a7c4a051ff567e015f61a0 - sha1sums = cfd8c8bfc6d52a03a142cbe07fff1dc2538060dd + sha1sums = 584b15ee837acb4a10dc39a83c4fbe2d3a6bcb7f sha1sums = d42765636661e6f0df64d23c8b7fdd4537675409 pkgname = rxvt-unicode-better-wheel-scrolling @@ -3,12 +3,12 @@ # Contributor: tobias <tobias@archlinux.org> # Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org -# using clear.patch by rlblaster: https://bbs.archlinux.org/viewtopic.php?id=129302 +# clear.patch based on patch by rlblaster: https://bbs.archlinux.org/viewtopic.php?id=129302 _pkgname=rxvt-unicode pkgname=${_pkgname}-better-wheel-scrolling pkgver=9.15 -pkgrel=1 +pkgrel=2 pkgdesc="An unicode enabled rxvt-clone terminal emulator (urxvt) w/ better wheel scrolling (VTE-like) (& no utmp/wtmp support)" arch=('i686' 'x86_64') url="http://software.schmorp.de/pkg/rxvt-unicode.html" @@ -22,11 +22,11 @@ source=(http://dist.schmorp.de/rxvt-unicode/${_pkgname}-${pkgver}.tar.bz2 \ clear.patch secondaryWheel.patch) md5sums=('15595aa326167ac5eb68c28d95432faf' '3de6c13126a45bc3bc9f6bba077a1311' - '8017fd25f177073c471dac7b9c063431' + '061b851e89e53a71d1afad6947c51ca7' 'ee638fc295bd563b9afd7e243e759c2c') sha1sums=('e6fdf091860ecb458730dc68b0176f67f207a2f7' '962aebc88982dbeb62a7c4a051ff567e015f61a0' - 'cfd8c8bfc6d52a03a142cbe07fff1dc2538060dd' + '584b15ee837acb4a10dc39a83c4fbe2d3a6bcb7f' 'd42765636661e6f0df64d23c8b7fdd4537675409') build() { diff --git a/clear.patch b/clear.patch index 0b72b6b99359..402287677a61 100644 --- a/clear.patch +++ b/clear.patch @@ -1,21 +1,61 @@ -diff -r 4399ffb6a87c src/command.C +diff -r 4399ffb6a87c -r 48f53e1cf599 src/command.C --- a/src/command.C Sat Jan 21 13:57:22 2012 +0100 -+++ b/src/command.C Sat Jan 21 14:03:49 2012 +0100 -@@ -2932,6 +2932,17 @@ ++++ b/src/command.C Mon Apr 30 16:22:25 2012 +0200 +@@ -2869,6 +2869,10 @@ + return; + } + ++ /* remember the current row on position change, in case there's a clear screen ++ * right after, so that we can add "preserve" the buffer (e.g. on ^L) */ ++ static int old_row = -1, was_moved = 0; ++ + switch (ch) + { + /* +@@ -2932,6 +2936,12 @@ case CSI_CUP: /* 8.3.21: (1,1) CURSOR POSITION */ case CSI_HVP: /* 8.3.64: (1,1) CHARACTER AND LINE POSITION */ -+ if (nargs == 1 && current_screen == 0) ++ /* if moving to row 1, remember current row in case a clear screen comes next */ ++ if (nargs == 1 && arg[0] == 1 && current_screen == 0) + { -+ // This is usually followed with clear screen so add some extra -+ // lines to avoid deleting the lines already on screen. If we are -+ // already at the top, add an extra screen height of lines. -+ int extra_lines = nrow-1; -+ if (screen.cur.row == 0) -+ extra_lines += nrow; -+ for (int i = 0; i < extra_lines; ++i) -+ scr_add_lines (L"\r\n", 2); ++ was_moved = 1; ++ old_row = screen.cur.row; + } scr_gotorc (arg[0] - 1, nargs < 2 ? 0 : (arg[1] - 1), 0); break; +@@ -2943,6 +2953,16 @@ + break; + + case CSI_ED: /* 8.3.40: (0) ERASE IN PAGE */ ++ if (was_moved) ++ { ++ /* this is most likely a ^L, so we'll go back to where we where before ++ * the position change, add a screen of empty lines, then move back ++ * on top. that way the (scrolling) buffer will be preserved */ ++ scr_gotorc (old_row, 0, 0); ++ for (int i = nrow - 1; i > 0; --i) ++ scr_add_lines (L"\r\n", 2); ++ scr_gotorc (0, 0, 0); ++ } + scr_erase_screen (arg[0]); + break; + +@@ -3086,6 +3106,16 @@ + default: + break; + } ++ if (was_moved > 0) ++ { ++ if (was_moved > 1) ++ { ++ was_moved = 0; ++ old_row = -1; ++ } ++ else ++ ++was_moved; ++ } + } + /*}}} */ + |