From 28c4cdecf5c46ecd506703ffa80efc21d3b48c23 Mon Sep 17 00:00:00 2001 From: jint_lzxy_ <50296129+Jint-lzxy@users.noreply.github.com> Date: Tue, 10 Sep 2024 21:34:46 +0800 Subject: [PATCH] fix(core): correct GUI detection post v0.10.2 (#1349) This commit resolves the change in behavior for the `has("gui_running")` check introduced after v0.10.2, which now only verifies if a real GUI (not a TUI) is running. Signed-off-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> --- lua/modules/plugins/editor.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/modules/plugins/editor.lua b/lua/modules/plugins/editor.lua index f396fc0ad..ce5767d65 100644 --- a/lua/modules/plugins/editor.lua +++ b/lua/modules/plugins/editor.lua @@ -100,7 +100,7 @@ editor["mrjones2014/smart-splits.nvim"] = { editor["nvim-treesitter/nvim-treesitter"] = { lazy = true, build = function() - if vim.fn.has("gui_running") == 1 then + if #vim.api.nvim_list_uis() > 0 then vim.api.nvim_command([[TSUpdate]]) end end,