From 00cccc9c599f492e906af6b5b799ae2093a564c0 Mon Sep 17 00:00:00 2001 From: Mat Jones Date: Fri, 3 May 2024 12:50:31 -0400 Subject: [PATCH] fix(wezterm): Make is_vim function work for both Pane and PaneInformation objects --- plugin/init.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugin/init.lua b/plugin/init.lua index f9102ab..2ac914e 100644 --- a/plugin/init.lua +++ b/plugin/init.lua @@ -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