diff options
author | Max Rees <maxcrees@me.com> | 2019-08-19 19:12:14 -0500 |
---|---|---|
committer | Max Rees <maxcrees@me.com> | 2019-08-19 19:12:14 -0500 |
commit | 12dc56030ed99e73bc19efcb627ea4fa1f475ddb (patch) | |
tree | 9f01b2a6c52b2b91fb3826b2569baa1a03c85490 | |
parent | a4e9e939954682c18b16d3ddcf9e79bdbc073e64 (diff) | |
download | packages-12dc56030ed99e73bc19efcb627ea4fa1f475ddb.tar.gz packages-12dc56030ed99e73bc19efcb627ea4fa1f475ddb.tar.bz2 packages-12dc56030ed99e73bc19efcb627ea4fa1f475ddb.tar.xz packages-12dc56030ed99e73bc19efcb627ea4fa1f475ddb.zip |
Actually, fix tmux instead of xterm
-rw-r--r-- | user/tmux/APKBUILD | 8 | ||||
-rw-r--r-- | user/tmux/xterm-DECLRMM.patch | 23 | ||||
-rw-r--r-- | user/xterm/APKBUILD | 6 | ||||
-rw-r--r-- | user/xterm/revert-xterm-347i.patch | 213 |
4 files changed, 30 insertions, 220 deletions
diff --git a/user/tmux/APKBUILD b/user/tmux/APKBUILD index 1748375c1..ebd0a38c0 100644 --- a/user/tmux/APKBUILD +++ b/user/tmux/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: pkgname=tmux pkgver=2.7 -pkgrel=1 +pkgrel=2 pkgdesc="Tool to control multiple terminals from a single terminal" url="https://tmux.github.io/" arch="all" @@ -10,7 +10,8 @@ license="MIT" depends="ncurses-terminfo" makedepends="bsd-compat-headers libevent-dev libutempter-dev ncurses-dev" subpackages="$pkgname-doc" -source="https://github.com/tmux/tmux/releases/download/$pkgver/$pkgname-$pkgver.tar.gz" +source="https://github.com/tmux/tmux/releases/download/$pkgver/$pkgname-$pkgver.tar.gz + xterm-DECLRMM.patch" build() { ./configure \ @@ -37,4 +38,5 @@ package() { done } -sha512sums="7839ef748ea55df8c02c727047f65bd235b5e3b8ab23157246071e1b9954fa269594da9fbd0fabf6a850e3b5dfda962a0a067c1507411c92a84d1db2666ecf37 tmux-2.7.tar.gz" +sha512sums="7839ef748ea55df8c02c727047f65bd235b5e3b8ab23157246071e1b9954fa269594da9fbd0fabf6a850e3b5dfda962a0a067c1507411c92a84d1db2666ecf37 tmux-2.7.tar.gz +7fb006f8f24d60614fcaeadace933c2ad6674d2476980736a830f63a40d7110638942478322336849d47707c99ab7de0cb01ff39806a4c9144650daf2f666773 xterm-DECLRMM.patch" diff --git a/user/tmux/xterm-DECLRMM.patch b/user/tmux/xterm-DECLRMM.patch new file mode 100644 index 000000000..b9bef3455 --- /dev/null +++ b/user/tmux/xterm-DECLRMM.patch @@ -0,0 +1,23 @@ +From 26f274011096b9eacfd2753d8f7afcb63e796ab9 Mon Sep 17 00:00:00 2001 +From: nicm <nicm> +Date: Thu, 1 Aug 2019 11:45:34 +0000 +Subject: [PATCH] xterm 348 now disables margins when resized, so send DECLRMM + again. + +--- + tty.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tty.c b/tty.c +index ab1da9fd3..024aef271 100644 +--- a/tty.c ++++ b/tty.c +@@ -1879,6 +1879,8 @@ tty_invalidate(struct tty *tty) + tty->rlower = tty->rright = UINT_MAX; + + if (tty->flags & TTY_STARTED) { ++ if (tty_use_margin(tty)) ++ tty_puts(tty, "\033[?69h"); /* DECLRMM */ + tty_putcode(tty, TTYC_SGR0); + + tty->mode = ALL_MODES; diff --git a/user/xterm/APKBUILD b/user/xterm/APKBUILD index 5c73b29fb..d1d870a8a 100644 --- a/user/xterm/APKBUILD +++ b/user/xterm/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> pkgname=xterm pkgver=348 -pkgrel=2 +pkgrel=3 pkgdesc="An X-based terminal emulator" url="https://invisible-island.net/xterm/" arch="all" @@ -14,7 +14,6 @@ makedepends="libx11-dev libsm-dev libice-dev libxt-dev utmps-dev libxaw-dev subpackages="$pkgname-doc" source="https://invisible-mirror.net/archives/xterm/xterm-$pkgver.tgz posix-ptmx.patch - revert-xterm-347i.patch " build() { @@ -46,5 +45,4 @@ package() { } sha512sums="852896c0aba885bafc80baad899fc56910dce66bf5df6b3fef3f998efc33af9d30b68cfb0c92c7028365ac4944af3d3c198bc0e408ca09e949b993a79c1e6dd9 xterm-348.tgz -e29ef756243faa6f5ced3c74d6879b4fc8f9839501becae49af4f458d0f499bcda40a0eb66dada9cae8bf9789256daf3d1605ac1b5b4301654d8b5ac6eaca81d posix-ptmx.patch -e2a632ce02adf43e3936f79ac694b60bee3742b05ee5165a4e834af650db8e90a9135de2c5daa21be0448c02c0be862c7b688d3f1373a23d9b6db15ee67a7c81 revert-xterm-347i.patch" +e29ef756243faa6f5ced3c74d6879b4fc8f9839501becae49af4f458d0f499bcda40a0eb66dada9cae8bf9789256daf3d1605ac1b5b4301654d8b5ac6eaca81d posix-ptmx.patch" diff --git a/user/xterm/revert-xterm-347i.patch b/user/xterm/revert-xterm-347i.patch deleted file mode 100644 index aa49ac3b9..000000000 --- a/user/xterm/revert-xterm-347i.patch +++ /dev/null @@ -1,213 +0,0 @@ -From 97ef79a674a13f806c58dc7d6eeeaa2e31cbca11 Mon Sep 17 00:00:00 2001 -From: Max Rees <maxcrees@me.com> -Date: Sun, 18 Aug 2019 21:12:19 -0500 -Subject: [PATCH] Revert "snapshot of project "xterm", label xterm-347i" - -The changes introduced in xterm-347i cause a regression in tmux's -"horizontal" (read: one pane on the left, and one pane on the right) -splitting behavior, making the graphical output unstable and unreadable. - -This reverts commit 7914e2709aa7836bfb61cd21f83880d4b7d44d8d. ---- - charproc.c | 43 +++++++++++++++---------------------------- - screen.c | 5 +++-- - util.c | 3 +-- - xterm.h | 16 +++------------- - 4 files changed, 22 insertions(+), 45 deletions(-) - -diff --git a/charproc.c b/charproc.c -index 5c0536c..3b04842 100644 ---- a/charproc.c -+++ b/charproc.c -@@ -1280,7 +1280,7 @@ set_ansi_conformance(TScreen *screen, int level) - * Set scrolling margins. VTxxx terminals require that the top/bottom are - * different, so we have at least two lines in the scrolling region. - */ --static void -+void - set_tb_margins(TScreen *screen, int top, int bottom) - { - TRACE(("set_tb_margins %d..%d, prior %d..%d\n", -@@ -1297,7 +1297,7 @@ set_tb_margins(TScreen *screen, int top, int bottom) - screen->bot_marg = screen->max_row; - } - --static void -+void - set_lr_margins(TScreen *screen, int left, int right) - { - TRACE(("set_lr_margins %d..%d, prior %d..%d\n", -@@ -1317,26 +1317,13 @@ set_lr_margins(TScreen *screen, int left, int right) - #define reset_tb_margins(screen) set_tb_margins(screen, 0, screen->max_row) - #define reset_lr_margins(screen) set_lr_margins(screen, 0, screen->max_col) - --void --resetMargins(XtermWidget xw) -+static void -+reset_margins(TScreen *screen) - { -- TScreen *screen = TScreenOf(xw); -- -- UIntClr(xw->flags, LEFT_RIGHT); - reset_tb_margins(screen); - reset_lr_margins(screen); - } - --static void --resetRendition(XtermWidget xw) --{ -- TScreen *screen = TScreenOf(xw); -- (void) screen; -- ResetItalics(xw); -- UIntClr(xw->flags, -- (SGR_MASK | SGR_MASK2 | INVISIBLE)); --} -- - void - set_max_col(TScreen *screen, int cols) - { -@@ -3225,7 +3212,9 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) - case DEFAULT: - /* FALLTHRU */ - case 0: -- resetRendition(xw); -+ ResetItalics(xw); -+ UIntClr(xw->flags, -+ (SGR_MASK | SGR_MASK2 | INVISIBLE)); - if_OPT_ISO_COLORS(screen, { - reset_SGR_Colors(xw); - }); -@@ -3706,12 +3695,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) - TRACE(("CASE_DECALN - alignment test\n")); - if (screen->cursor_state) - HideCursor(); -- /* -- * DEC STD 070 does not mention left/right margins. Likely the -- * text was for VT100, and not updated for VT420. -- */ -- resetRendition(xw); -- resetMargins(xw); -+ reset_margins(screen); - CursorSet(screen, 0, 0, xw->flags); - xtermParseRect(xw, 0, 0, &myRect); - ScrnFillRectangle(xw, &myRect, 'E', 0, False); -@@ -6074,13 +6058,16 @@ dpmodes(XtermWidget xw, BitFunc func) - if (screen->c132) { - if (!(xw->flags & NOCLEAR_COLM)) - ClearScreen(xw); -+ CursorSet(screen, 0, 0, xw->flags); - if ((j = IsSM()? 132 : 80) != - ((xw->flags & IN132COLUMNS) ? 132 : 80) || - j != MaxCols(screen)) - RequestResize(xw, -1, j, True); - (*func) (&xw->flags, IN132COLUMNS); -- resetMargins(xw); -- CursorSet(screen, 0, 0, xw->flags); -+ if (xw->flags & IN132COLUMNS) { -+ UIntClr(xw->flags, LEFT_RIGHT); -+ reset_lr_margins(screen); -+ } - } - break; - case srm_DECSCLM: /* (slow scroll) */ -@@ -10636,7 +10623,7 @@ VTRealize(Widget w, - set_cur_row(screen, 0); - set_max_col(screen, Width(screen) / screen->fullVwin.f_width - 1); - set_max_row(screen, Height(screen) / screen->fullVwin.f_height - 1); -- resetMargins(xw); -+ reset_margins(screen); - - memset(screen->sc, 0, sizeof(screen->sc)); - -@@ -11951,7 +11938,7 @@ ReallyReset(XtermWidget xw, Bool full, Bool saved) - #endif - - /* reset scrolling region */ -- resetMargins(xw); -+ reset_margins(screen); - - bitclr(&xw->flags, ORIGIN); - -diff --git a/screen.c b/screen.c -index 4e8a0bf..2af76bc 100644 ---- a/screen.c -+++ b/screen.c -@@ -1,4 +1,4 @@ --/* $XTermId: screen.c,v 1.578 2019/07/19 22:35:41 tom Exp $ */ -+/* $XTermId: screen.c,v 1.577 2019/06/30 18:45:09 tom Exp $ */ - - /* - * Copyright 1999-2018,2019 by Thomas E. Dickey -@@ -2236,7 +2236,8 @@ ScreenResize(XtermWidget xw, - } - - /* adjust scrolling region */ -- resetMargins(xw); -+ set_tb_margins(screen, 0, screen->max_row); -+ set_lr_margins(screen, 0, screen->max_col); - UIntClr(*flags, ORIGIN); - - if (screen->cur_row > screen->max_row) -diff --git a/util.c b/util.c -index 7623efa..7300300 100644 ---- a/util.c -+++ b/util.c -@@ -1,4 +1,4 @@ --/* $XTermId: util.c,v 1.803 2019/07/20 00:10:34 tom Exp $ */ -+/* $XTermId: util.c,v 1.802 2019/07/19 00:40:41 tom Exp $ */ - - /* - * Copyright 1999-2018,2019 by Thomas E. Dickey -@@ -3687,7 +3687,6 @@ drawXtermText(XtermWidget xw, - #define NOT_BOLD (attr_flags & ~BOLDATTR(screen)) - font = getNormXftFont(xw, attr_flags, &did_ul); - font0 = IS_BOLD ? getNormXftFont(xw, NOT_BOLD, &did_ul) : font; -- (void) font0; - #if OPT_RENDERWIDE - wfont = getWideXftFont(xw, attr_flags); - wfont0 = IS_BOLD ? getWideXftFont(xw, NOT_BOLD) : wfont; -diff --git a/xterm.h b/xterm.h -index 89a4482..fecac7f 100644 ---- a/xterm.h -+++ b/xterm.h -@@ -1,4 +1,4 @@ --/* $XTermId: xterm.h,v 1.841 2019/07/19 22:35:06 tom Exp $ */ -+/* $XTermId: xterm.h,v 1.839 2019/07/19 00:40:41 tom Exp $ */ - - /* - * Copyright 1999-2018,2019 by Thomas E. Dickey -@@ -957,11 +957,12 @@ extern void lookupSelectUnit(XtermWidget /* xw */, Cardinal /* item */, String / - extern void releaseCursorGCs(XtermWidget /*xw*/); - extern void releaseWindowGCs(XtermWidget /*xw*/, VTwin * /*win*/); - extern void resetCharsets (TScreen * /* screen */); --extern void resetMargins (XtermWidget /* xw */); - extern void restoreCharsets (TScreen * /* screen */, DECNRCM_codes * /* source */); - extern void saveCharsets (TScreen * /* screen */, DECNRCM_codes * /* target */); - extern void set_max_col(TScreen * /* screen */, int /* cols */); - extern void set_max_row(TScreen * /* screen */, int /* rows */); -+extern void set_lr_margins (TScreen * /* screen */, int /* left */, int /* right */); -+extern void set_tb_margins (TScreen * /* screen */, int /* top */, int /* bottom */); - extern void unparse_end (XtermWidget /* xw */); - extern void unparseputc (XtermWidget /* xw */, int /* c */); - extern void unparseputc1 (XtermWidget /* xw */, int /* c */); -@@ -1406,17 +1407,6 @@ extern void LineSetFlag(LineData /* ld */, int /* flag */); - #define ScrnIsColInMargins(screen, col) \ - ((col) >= (screen)->lft_marg && (col) <= (screen)->rgt_marg) - --/* -- * If the vertical scrolling margins are active, they will be something other -- * than the first/last row of the visible screen, as well as being distinct. -- */ --#define IsTopBottomMode(xw) (ScrnTopMargin(xw) < ScrnBottomMargin(xw)) --#define ScrnTopMargin(xw) TScreenOf(xw)->top_marg --#define ScrnBottomMargin(xw) TScreenOf(xw)->bot_marg -- --/* -- * Left/right horizontal scrolling margins are only active when DECLRMM is. -- */ - #define IsLeftRightMode(xw) ((xw)->flags & LEFT_RIGHT) - #define ScrnLeftMargin(xw) (IsLeftRightMode(xw) \ - ? TScreenOf(xw)->lft_marg \ --- -2.22.1 - |