summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRay Song2016-03-22 01:46:44 +0800
committerRay Song2016-03-22 01:47:16 +0800
commit0b57c2a77f6f55ec0dc78fddb18e90337421725a (patch)
tree23f5e0fc0210573a4d2a452a071f78652800d85d
downloadaur-0b57c2a77f6f55ec0dc78fddb18e90337421725a.tar.gz
initial
-rw-r--r--.SRCINFO22
-rw-r--r--LICENSE13
-rw-r--r--PKGBUILD41
-rw-r--r--fullwidth-backspace.patch37
4 files changed, 113 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b991437785d4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = tmux-fullwidth-backspace
+ pkgdesc = A terminal multiplexer (patched with support for fullwidth backspace
+ pkgver = 2.1
+ pkgrel = 2
+ url = http://tmux.github.io/
+ arch = i686
+ arch = x86_64
+ license = BSD
+ depends = ncurses
+ depends = libevent
+ depends = libutempter
+ provides = tmux
+ conflicts = tmux
+ source = https://github.com/tmux/tmux/releases/download/2.1/tmux-2.1.tar.gz
+ source = LICENSE
+ source = fullwidth-backspace.patch
+ md5sums = 74a2855695bccb51b6e301383ad4818c
+ md5sums = 71601bc37fa44e4395580b321963018e
+ md5sums = b9ff3b7e4f214d13aaaea0629dae4689
+
+pkgname = tmux-fullwidth-backspace
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000000..3ccacc76d874
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
+IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..4401a2553181
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 163998 2016-03-01 16:55:48Z spupykin $
+# Maintainer: Ray Song <i@maskray.me>
+
+pkgname=tmux-fullwidth-backspace
+pkgver=2.1
+pkgrel=2
+pkgdesc='A terminal multiplexer (patched with support for fullwidth backspace'
+url='http://tmux.github.io/'
+arch=('i686' 'x86_64')
+license=('BSD')
+depends=('ncurses' 'libevent' 'libutempter')
+source=(https://github.com/tmux/tmux/releases/download/$pkgver/tmux-$pkgver.tar.gz
+ LICENSE fullwidth-backspace.patch)
+provides=('tmux')
+conflicts=('tmux')
+md5sums=('74a2855695bccb51b6e301383ad4818c'
+ '71601bc37fa44e4395580b321963018e'
+ 'b9ff3b7e4f214d13aaaea0629dae4689')
+
+prepare() {
+ patch -p1 < ../fullwidth-backspace.patch
+}
+
+build() {
+ cd "$srcdir/tmux-${pkgver/_/}"
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$srcdir/tmux-${pkgver/_/}"
+ make install DESTDIR=$pkgdir
+ install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/tmux/LICENSE"
+
+ install -dm755 "$pkgdir/usr/share/tmux/" "$pkgdir/usr/share/vim/vimfiles/syntax/"
+ install -m644 examples/* "$pkgdir/usr/share/tmux/"
+ ln -s /usr/share/tmux/tmux.vim "$pkgdir/usr/share/vim/vimfiles/syntax/tmux.vim"
+
+ install -d $pkgdir/usr/share/bash-completion/completions/
+ mv $pkgdir/usr/share/tmux/bash_completion_tmux.sh $pkgdir/usr/share/bash-completion/completions/tmux
+}
diff --git a/fullwidth-backspace.patch b/fullwidth-backspace.patch
new file mode 100644
index 000000000000..183d06f11d7e
--- /dev/null
+++ b/fullwidth-backspace.patch
@@ -0,0 +1,37 @@
+--- a/tmux-2.1/screen-write.c 2016-03-22 01:39:12.909169226 +0800
++++ b/tmux-2.1/screen-write.c 2016-03-22 01:39:57.147655122 +0800
+@@ -18,8 +18,11 @@
+
+ #include <sys/types.h>
+
++#include <assert.h>
++#include <fcntl.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <unistd.h>
+
+ #include "tmux.h"
+
+@@ -488,8 +491,20 @@
+ s->cy--;
+ s->cx = screen_size_x(s) - 1;
+ }
+- } else
+- s->cx--;
++ } else {
++ struct termios tio;
++ int fd = open(ctx->wp->tty, O_RDONLY);
++ assert(tcgetattr(fd, &tio) == 0);
++ close(fd);
++ if (tio.c_lflag & ICANON && tio.c_iflag & IUTF8) {
++ gl = &s->grid->linedata[s->grid->hsize + s->cy];
++ if (s->cx >= 2 && grid_cell_width(&gl->celldata[s->cx-2]) == 2)
++ s->cx -= 2;
++ else
++ s->cx--;
++ } else
++ s->cx--;
++ }
+ }
+
+ /* VT100 alignment test. */