From 49dc3d9424353e6fb3ae022ab1261c83a8f1c0e3 Mon Sep 17 00:00:00 2001 From: bfredl Date: Thu, 2 Apr 2026 11:53:48 +0200 Subject: build(zig): run oldtests in zig builds with new lua runner The new lua based runner replaces Makefile, runnvim.sh and runnvim.vim As it happens, we run a `--headless` nvim inside a `:terminal` layer, this is pointless. Also there is still a lot remnants for oldesttests, but we don't have any except for test1.in which just checks the environment for following, nonexistant oldesttests. so just skip that. For now, the actual vimscript code which runs in vim-under-test is completely unchanged. On macos, luajit is finally working with the latest ziglua master. Also fix some minor bugs regarding locales, such as incorrect HAVE_WORKING_LIBINTL checks --- runtime/lua/vim/treesitter.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/treesitter.lua b/runtime/lua/vim/treesitter.lua index 5a982deb0d..8e63750dd2 100644 --- a/runtime/lua/vim/treesitter.lua +++ b/runtime/lua/vim/treesitter.lua @@ -97,12 +97,12 @@ function M.get_parser(buf, lang, opts) if not api.nvim_buf_is_loaded(buf) then return nil, string.format('Buffer %s must be loaded to create parser', buf) end - local parser = vim.npcall(M._create_parser, buf, lang, opts) - if not parser then - return nil, - string.format('Parser could not be created for buffer %s and language "%s"', buf, lang) + local status, res = pcall(M._create_parser, buf, lang, opts) + if not status then + local msg = 'Parser could not be created for buffer %s and language "%s": %s' + return nil, string.format(msg, buf, lang, res) end - parsers[buf] = parser + parsers[buf] = res end parsers[buf]:register_cbs(opts.buf_attach_cbs) -- cgit