[arch-commits] Commit in tmux/repos (4 files)
Evangelos Foutras
foutrelis at archlinux.org
Tue Aug 6 03:16:58 UTC 2019
Date: Tuesday, August 6, 2019 @ 03:16:57
Author: foutrelis
Revision: 497543
archrelease: copy trunk to community-staging-x86_64
Added:
tmux/repos/community-staging-x86_64/
tmux/repos/community-staging-x86_64/0001-fix-sizing.patch
(from rev 497542, tmux/trunk/0001-fix-sizing.patch)
tmux/repos/community-staging-x86_64/LICENSE
(from rev 497542, tmux/trunk/LICENSE)
tmux/repos/community-staging-x86_64/PKGBUILD
(from rev 497542, tmux/trunk/PKGBUILD)
-----------------------+
0001-fix-sizing.patch | 112 ++++++++++++++++++++++++++++++++++++++++++++++++
LICENSE | 13 +++++
PKGBUILD | 40 +++++++++++++++++
3 files changed, 165 insertions(+)
Copied: tmux/repos/community-staging-x86_64/0001-fix-sizing.patch (from rev 497542, tmux/trunk/0001-fix-sizing.patch)
===================================================================
--- community-staging-x86_64/0001-fix-sizing.patch (rev 0)
+++ community-staging-x86_64/0001-fix-sizing.patch 2019-08-06 03:16:57 UTC (rev 497543)
@@ -0,0 +1,112 @@
+commit 38b8a198bac62c16d351c54ed83ead29a2e0ecc8
+Author: nicm <nicm>
+Date: Tue May 14 07:37:50 2019 +0000
+
+ Fix sizing of main-vertical and main-horizontal layouts, GitHub issue 1736.
+
+diff --git a/layout-set.c b/layout-set.c
+index 3a088a4c..12b4780f 100644
+--- a/layout-set.c
++++ b/layout-set.c
+@@ -185,7 +185,7 @@ layout_set_main_h(struct window *w)
+ {
+ struct window_pane *wp;
+ struct layout_cell *lc, *lcmain, *lcother, *lcchild;
+- u_int n, mainh, otherh, sx;
++ u_int n, mainh, otherh, sx, sy;
+
+ layout_print_cell(w->layout_root, __func__, 1);
+
+@@ -195,22 +195,25 @@ layout_set_main_h(struct window *w)
+ return;
+ n--; /* take off main pane */
+
++ /* Find available height - take off one line for the border. */
++ sy = w->sy - 1;
++
+ /* Get the main pane height and work out the other pane height. */
+ mainh = options_get_number(w->options, "main-pane-height");
+- if (mainh + PANE_MINIMUM + 1 >= w->sy) {
+- if (w->sy <= PANE_MINIMUM + 1 + PANE_MINIMUM)
++ if (mainh + PANE_MINIMUM >= sy) {
++ if (sy <= PANE_MINIMUM + PANE_MINIMUM)
+ mainh = PANE_MINIMUM;
+ else
+- mainh = w->sy - (PANE_MINIMUM + 1);
++ mainh = sy - PANE_MINIMUM;
+ otherh = PANE_MINIMUM;
+ } else {
+ otherh = options_get_number(w->options, "other-pane-height");
+ if (otherh == 0)
+- otherh = w->sy - mainh;
+- else if (otherh > w->sy || w->sy - otherh < mainh)
+- otherh = w->sy - mainh;
++ otherh = sy - mainh;
++ else if (otherh > sy || sy - otherh < mainh)
++ otherh = sy - mainh;
+ else
+- mainh = w->sy - otherh;
++ mainh = sy - otherh;
+ }
+
+ /* Work out what width is needed. */
+@@ -221,7 +224,7 @@ layout_set_main_h(struct window *w)
+ /* Free old tree and create a new root. */
+ layout_free(w);
+ lc = w->layout_root = layout_create_cell(NULL);
+- layout_set_size(lc, sx, mainh + otherh, 0, 0);
++ layout_set_size(lc, sx, mainh + otherh + 1, 0, 0);
+ layout_make_node(lc, LAYOUT_TOPBOTTOM);
+
+ /* Create the main pane. */
+@@ -269,7 +272,7 @@ layout_set_main_v(struct window *w)
+ {
+ struct window_pane *wp;
+ struct layout_cell *lc, *lcmain, *lcother, *lcchild;
+- u_int n, mainw, otherw, sy;
++ u_int n, mainw, otherw, sx, sy;
+
+ layout_print_cell(w->layout_root, __func__, 1);
+
+@@ -279,22 +282,25 @@ layout_set_main_v(struct window *w)
+ return;
+ n--; /* take off main pane */
+
++ /* Find available width - take off one line for the border. */
++ sx = w->sx - 1;
++
+ /* Get the main pane width and work out the other pane width. */
+ mainw = options_get_number(w->options, "main-pane-width");
+- if (mainw + PANE_MINIMUM + 1 >= w->sx) {
+- if (w->sx <= PANE_MINIMUM + 1 + PANE_MINIMUM)
++ if (mainw + PANE_MINIMUM >= sx) {
++ if (sx <= PANE_MINIMUM + PANE_MINIMUM)
+ mainw = PANE_MINIMUM;
+ else
+- mainw = w->sx - (PANE_MINIMUM + 1);
++ mainw = sx - PANE_MINIMUM;
+ otherw = PANE_MINIMUM;
+ } else {
+ otherw = options_get_number(w->options, "other-pane-width");
+ if (otherw == 0)
+- otherw = w->sx - mainw;
+- else if (otherw > w->sx || w->sx - otherw < mainw)
+- otherw = w->sx - mainw;
++ otherw = sx - mainw;
++ else if (otherw > sx || sx - otherw < mainw)
++ otherw = sx - mainw;
+ else
+- mainw = w->sx - otherw;
++ mainw = sx - otherw;
+ }
+
+ /* Work out what height is needed. */
+@@ -305,7 +311,7 @@ layout_set_main_v(struct window *w)
+ /* Free old tree and create a new root. */
+ layout_free(w);
+ lc = w->layout_root = layout_create_cell(NULL);
+- layout_set_size(lc, mainw + otherw, sy, 0, 0);
++ layout_set_size(lc, mainw + otherw + 1, sy, 0, 0);
+ layout_make_node(lc, LAYOUT_LEFTRIGHT);
+
+ /* Create the main pane. */
Copied: tmux/repos/community-staging-x86_64/LICENSE (from rev 497542, tmux/trunk/LICENSE)
===================================================================
--- community-staging-x86_64/LICENSE (rev 0)
+++ community-staging-x86_64/LICENSE 2019-08-06 03:16:57 UTC (rev 497543)
@@ -0,0 +1,13 @@
+Copyright (c) 2007 Nicholas Marriott <nicm at 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.
Copied: tmux/repos/community-staging-x86_64/PKGBUILD (from rev 497542, tmux/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2019-08-06 03:16:57 UTC (rev 497543)
@@ -0,0 +1,40 @@
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Maintainer: TDY <tdy at gmx.com>
+# Contributor: Grigorios Bouzakis <grbzks[at]gmail[dot]com>
+
+pkgname=tmux
+pkgver=2.9_a
+pkgrel=3
+pkgdesc='A terminal multiplexer'
+url='https://github.com/tmux/tmux/wiki'
+arch=('x86_64')
+license=('BSD')
+depends=('ncurses' 'libevent' 'libutempter')
+source=("https://github.com/tmux/tmux/releases/download/${pkgver/_/}/tmux-${pkgver/_/}.tar.gz"
+ '0001-fix-sizing.patch'
+ 'LICENSE')
+sha256sums=('839d167a4517a6bffa6b6074e89a9a8630547b2dea2086f1fad15af12ab23b25'
+ '74c89e7c85622c44a07fdce1eefd021dbb0e484a02f7da210ae3ebfa5fdd2fe4'
+ 'b5de80619e4884ced2dfe0a96020e85dcfb715a831ecdfdd7ce8c97b5a6ff2cc')
+
+prepare() {
+ cd "$srcdir/$pkgname-${pkgver/_/}"
+
+ patch -Np1 < ../0001-fix-sizing.patch
+}
+
+build() {
+ cd "$srcdir/$pkgname-${pkgver/_/}"
+
+ ./configure \
+ --prefix=/usr \
+ --enable-utempter
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-${pkgver/_/}"
+
+ make install DESTDIR="$pkgdir"
+ install -Dm644 "$srcdir"/LICENSE "$pkgdir/usr/share/licenses/tmux/LICENSE"
+}
More information about the arch-commits
mailing list