From 9f909929344287bc1246d6b4dab55d500b514396 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 28 Nov 2025 15:04:49 -0800 Subject: [PATCH] fix(scripts): gen_terminfo clears Windows terminfo definitions #36736 Problem: `gen_terminfo.lua` clears out Windows terminfo definitions: rm -r /tmp/nvim_terminfo nvim -ll src/gen/gen_terminfo.lua `src/nvim/tui/terminfo_builtin.h`: static const TerminfoEntry vtpcon_terminfo = { .bce = false, .has_Tc_or_RGB = false, .Su = false, .max_colors = -1, .lines = -1, .columns = -1, .defs = { [kTerm_carriage_return] = NULL, [kTerm_change_scroll_region] = NULL, [kTerm_clear_screen] = NULL, [kTerm_clr_eol] = NULL, [kTerm_clr_eos] = NULL, [kTerm_cursor_address] = NULL, [kTerm_cursor_down] = NULL, [kTerm_cursor_invisible] = NULL, [kTerm_cursor_left] = NULL, [kTerm_cursor_home] = NULL, [kTerm_cursor_normal] = NULL, [kTerm_cursor_up] = NULL, [kTerm_cursor_right] = NULL, [kTerm_delete_line] = NULL, ... Solution: Generate the database in 2 steps, don't concatenate the sources. --- src/gen/gen_terminfo.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gen/gen_terminfo.lua b/src/gen/gen_terminfo.lua index 2760c9dc32..d268b5b81b 100644 --- a/src/gen/gen_terminfo.lua +++ b/src/gen/gen_terminfo.lua @@ -111,7 +111,8 @@ if vim.uv.fs_stat(db) == nil then end sys('curl -O ' .. url) sys('gunzip -f terminfo.src.gz') - sys('cat terminfo.src scripts/windows.ti | tic -x -o "' .. db .. '" -') + sys('cat terminfo.src | tic -x -o "' .. db .. '" -') + sys('cat scripts/windows.ti | tic -x -o "' .. db .. '" -') sys('rm -f terminfo.src') else print('using cached terminfo in ' .. db)