Fix a bug that causes the cursor position to be incorrect when opening new terminals: http://lists.schmorp.de/pipermail/rxvt-unicode/2023q1/002639.html https://bugs.archlinux.org/task/77062 https://gitlab.alpinelinux.org/alpine/aports/-/issues/14525 This patches reverts all changes made to 'src/screen.C' in rxvt-unicode 9.31. --- rxvt-unicode-9.31/src/screen.C 2022-08-08 06:33:08.000000000 -0400 +++ rxvt-unicode-9.30/src/screen.C 2021-07-02 23:55:47.000000000 -0400 @@ -293,7 +293,6 @@ int common_col = min (prev_ncol, ncol); - // resize swap_buf, blank drawn_buf for (int row = min (nrow, prev_nrow); row--; ) { scr_blank_screen_mem (drawn_buf [row], DEFAULT_RSTYLE); @@ -307,7 +306,6 @@ int pend = MOD (term_start + top_row , prev_total_rows); int q = total_rows; // rewrapped row -#if ENABLE_FRILLS if ((rewrap_always || top_row) && !rewrap_never) { // Re-wrap lines. This is rather ugly, possibly because I am too dumb @@ -389,35 +387,36 @@ scr_blank_line (*qline, qline->l, ncol - qline->l, DEFAULT_RSTYLE); } while (p != pend && q > 0); + + term_start = total_rows - nrow; + top_row = q - term_start; + + // make sure all terminal lines exist + while (top_row > 0) + scr_blank_screen_mem (ROW (--top_row), DEFAULT_RSTYLE); } else -#endif { - // wing, instead of wrap - screen.cur.row += nrow - prev_nrow; + // if no scrollback exists (yet), wing, instead of wrap - do + for (int row = min (nrow, prev_nrow); row--; ) { - p = MOD (p - 1, prev_total_rows); - q--; + line_t &src = prev_row_buf [MOD (term_start + row, prev_total_rows)]; + line_t &dst = row_buf [row]; - copy_line (row_buf [q], prev_row_buf [p]); + copy_line (dst, src); } - while (p != pend && q > 0); - } - term_start = total_rows - nrow; - top_row = q - term_start; + for (int row = prev_nrow; row < nrow; row++) + scr_blank_screen_mem (row_buf [row], DEFAULT_RSTYLE); - // make sure all terminal lines exist - while (top_row > 0) - scr_blank_screen_mem (ROW (--top_row), DEFAULT_RSTYLE); + term_start = 0; + } clamp_it (screen.cur.row, 0, nrow - 1); clamp_it (screen.cur.col, 0, ncol - 1); } - // ensure drawn_buf, swap_buf and terminal rows are all initialized for (int row = nrow; row--; ) { if (!ROW (row).valid ()) scr_blank_screen_mem (ROW (row), DEFAULT_RSTYLE); ackage-aliases.sh?id=ad54a73bb820a685f242976a86be63931789fa97'>guix build: Record package transformations in manifest entries....With this change, package transformation options used while building a manifest are saved in the metadata of the manifest entries. * guix/scripts/build.scm (transformation-procedure): New procedure. (options->transformation)[applicable]: Use it. Change to a list of key/value/proc tuples instead of key/proc pairs. [package-with-transformation-properties, tagged-object]: New procedures. Use them. (package-transformations, manifest-entry-with-transformations): New procedures. * guix/scripts/pack.scm (guix-pack)[with-transformations]: New procedure. Use it. * guix/scripts/package.scm (process-actions)[transform-entry]: Use it. * tests/guix-package-aliases.sh: Add test. Ludovic Courtès 2020-09-28tests: Simplify shell exit status negation;...* tests/guix-archive.sh, tests/guix-build-branch.sh, tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh, tests/guix-environment.sh, tests/guix-gc.sh, tests/guix-git-authenticate.sh, tests/guix-graph.sh, tests/guix-hash.sh, tests/guix-lint.sh, tests/guix-pack-relocatable.sh, tests/guix-pack.sh, tests/guix-package-aliases.sh, tests/guix-package-net.sh, tests/guix-package.sh: Use the shell '!' keyword to negate command exit status in place of 'if ...; then false; else true; fi' Eric Bavier 2020-05-11tests: Test 'guix show' with multiple packages....* tests/guix-package-aliases.sh: Test 'guix show' with multiple packages. Ludovic Courtès 2019-09-21guix package: '--show' ignores deprecated packages....* guix/scripts/package.scm (process-query) <'show>: Remove superseded packages. * tests/guix-package-aliases.sh: Add test. Ludovic Courtès 2019-09-21guix package: Add 'guix show' alias....* guix/scripts/show.scm: New file. * Makefile.am (MODULES): Add it. * po/guix/POTFILES.in: Add it. * tests/guix-package-aliases.sh: Add test. * doc/guix.texi (Invoking guix package): Document it and use it in a example. Signed-off-by: Ludovic Courtès <ludo@gnu.org> zimoun 2019-04-29guix package: Add 'guix search' alias....* guix/scripts/search.scm: New file. * Makefile.am (MODULES): Add it. * po/guix/POTFILES.in: Add it. * tests/guix-package-aliases.sh: Add test. * doc/guix.texi (Invoking guix package): Document it and use it in a couple of examples. Ludovic Courtès 2019-04-29guix package: Add 'install', 'remove', and 'upgrade' aliases....* guix/scripts/install.scm, guix/scripts/remove.scm, guix/scripts/upgrade.scm, tests/guix-package-aliases.sh: New files. * Makefile.am (MODULES, SH_TESTS): Add them. * po/guix/POTFILES.in: Add them. * guix/scripts/package.scm (guix-package): Split with... (guix-package*): ... this. New procedure. * doc/guix.texi (Invoking guix package): Document them. (Binary Installation, Application Setup, Package Management) (Packages with Multiple Outputs, Package Modules) (X.509 Certificates, Installing Debugging Files): Use 'guix install' in simple examples. * etc/completion/bash/guix (_guix_complete): Handle "install", "remove", and "upgrade". Ludovic Courtès