Skip to content

Commit

Permalink
fix(wezterm): Make is_vim function work for both Pane and PaneInforma…
Browse files Browse the repository at this point in the history
…tion objects
  • Loading branch information
mrjones2014 committed May 3, 2024
1 parent 85dc2e7 commit 00cccc9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugin/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ end
local wezterm = require('wezterm')

local function is_vim(pane)
-- if type is PaneInformation
if pane.user_vars ~= nil then
return pane.user_vars.IS_NVIM == 'true'
end

-- this is set by the Neovim plugin on launch, and unset on ExitPre in Neovim
return pane:get_user_vars().IS_NVIM == 'true'
end
Expand Down

0 comments on commit 00cccc9

Please sign in to comment.