From 7150ae0150852315fffdf08042a1ccb2a76ba4cb Mon Sep 17 00:00:00 2001 From: Tomas Janousek Date: Mon, 30 Mar 2026 00:12:33 +0100 Subject: [PATCH] revert: "fix(scripts): gen_terminfo clears Windows terminfo definitions #36736" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: `gen_terminfo.lua`'s output is unpredictable and depends on the system ncurses version. Invoking `tic` on `scripts/windows.ti` alone makes it use the system terminfo definitions for the `use=…` fragments in `windows.ti` such as: use=xterm+256color, use=xterm+sl, use=xterm-new This is particularly problematic on Debian, as they build ncurses with `--with-xterm-kbs=del` [1], and thus some of the windows entries end up with different definitions for `kTermKey_left`, which is almost certainly not desired. [1]: https://salsa.debian.org/debian/ncurses/-/blob/2d238cf3875f1a0a7c874f0a9b14f7582d19907a/debian/rules#L149 Solution: This reverts commit 9f909929344287bc1246d6b4dab55d500b514396. --- src/gen/gen_terminfo.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gen/gen_terminfo.lua b/src/gen/gen_terminfo.lua index 2ecf635ac9..ebb9d2870d 100644 --- a/src/gen/gen_terminfo.lua +++ b/src/gen/gen_terminfo.lua @@ -123,8 +123,7 @@ if vim.uv.fs_stat(db) == nil then end sys('curl -O ' .. url) sys('gunzip -f terminfo.src.gz') - sys(('cat terminfo.src | tic -x -o "%s" -'):format(db)) - sys(('cat scripts/windows.ti | tic -x -o "%s" -'):format(db)) + sys(('cat terminfo.src scripts/windows.ti | tic -x -o "%s" -'):format(db)) sys('rm -f terminfo.src') else print('using cached terminfo in ' .. db)