浏览代码

fix(vim-interaction): look up the newest GVim instance (#9095)

Instead of relying on a hardcoded instance-name existing for the default-value, let's
look up the latest instance. This also resolves my problem where MacVim
had a servername of "VIM" instead of "GVIM".

Co-authored-by: Johann Fridriksson <jofridri@silabs.com>
Jóhann Friðriksson 2 年之前
父节点
当前提交
aa6e932b06
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      plugins/vim-interaction/vim-interaction.plugin.zsh

+ 2 - 1
plugins/vim-interaction/vim-interaction.plugin.zsh

@@ -22,7 +22,8 @@ EOH
   local cmd=""
   local before="<esc>"
   local after=""
-  local name="GVIM"
+  # Look up the newest instance
+  local name="$(gvim --serverlist | tail -n 1)"
   while getopts ":b:a:n:" option
   do
     case $option in