Skip to content

Commit

Permalink
fix(core): correct GUI detection post v0.10.2
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Jint-lzxy committed Sep 10, 2024
1 parent 1e2f498 commit 4808adc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/modules/plugins/editor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4808adc

Please sign in to comment.