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); vail'>...* guix/scripts/graph.scm (display-path): New procedure. (%options, show-help): Add '--path'. (guix-graph): Handle it. * tests/guix-graph.sh: Add tests. * doc/guix.texi (Invoking guix graph): Document it. (Invoking guix size): Mention it. Ludovic Courtès 2020-01-16graph: Add '--load-path' option....* guix/scripts/graph.scm (%option): Add '--load-path' option. * doc/guix.texi: Document it. * tests/guix-graph.sh: Test it. Pierre Neidhardt 2019-11-07graph: Support package transformation options....* guix/scripts/graph.scm (%options): Append %TRANSFORMATION-OPTIONS. (show-help): Call 'show-transformation-options-help'. (guix-graph): Call 'options->transformation' and use it. * tests/guix-graph.sh: Add test. * doc/guix.texi (Invoking guix graph): Document it. Ludovic Courtès 2016-05-21graph: Allow store file names for 'derivation' and 'references' graphs....* guix/scripts/graph.scm (%derivation-node-type)[convert]: Add 'derivation-path?' and catch-all clauses. (%reference-node-type)[convert]: Add 'store-path?' and catch-all clauses. (assert-package, nodes-from-package): New procedures. (%package-node-type, %bag-node-type,%bag-with-origins-node-type) (%bag-emerged-node-type): Add 'convert' field (guix-graph): Rename 'packages' to 'items' and allow 'store-path?' arguments. * guix/graph.scm (<node-type>)[convert]: Adjust comment. * doc/guix.texi (Invoking guix graph): Document it. Ludovic Courtès 2015-11-23graph: Add '%bag-with-origins-node-type'....* guix/scripts/graph.scm (bag-node-edges): Remove 'filter' call. Add case for 'origin'. (%bag-node-type)[edges]: Add filtering here. (%bag-with-origins-node-type): New variable. (%node-types): Add it. * tests/graph.scm ("bag DAG, including origins"): New test. * tests/guix-graph.sh: Add 'bag-with-origins'. * doc/guix.texi (Invoking guix graph): Document it. Ludovic Courtès 2015-09-02graph: Add '--expression'....* guix/scripts/graph.scm (%options, show-help): Add '--expression'. (guix-graph): Call 'read/eval-package-expression' for 'expression' pairs in OPTS. * tests/guix-graph.sh: Add tests. * doc/guix.texi (Invoking guix graph): Document it. Ludovic Courtès 2015-08-27Add 'guix graph'....* guix/scripts/graph.scm, tests/graph.scm, tests/guix-graph.sh, doc/images/coreutils-bag-graph.dot, doc/images/coreutils-graph.dot: New files. * Makefile.am (MODULES): Add guix/scripts/graph.scm. (SH_TESTS): Add tests/guix-graph.sh. (SCM_TESTS): Add tests/graph.scm. * doc.am (DOT_FILES, DOT_VECTOR_GRAPHICS): New variables. (EXTRA_DIST): Use them. (dist_infoimage_DATA): Use $(DOT_FILES). (pdf-local, info-local, ps-local): Likewise. * doc/guix.texi (Packages with Multiple Outputs): Add cross-reference to 'guix graph'. (Invoking guix gc): Likewise. (Invoking guix graph): New section. Ludovic Courtès