neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 9f909929344287bc1246d6b4dab55d500b514396
parent eb3201c77210417ced068ffd59722fe6c1dcd50d
Author: Justin M. Keyes <justinkz@gmail.com>
Date:   Fri, 28 Nov 2025 15:04:49 -0800

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.
Diffstat:
Msrc/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 @@ -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)