解决 vim 插件 taglist 报错:Error detected while processing function

前端之家收集整理的这篇文章主要介绍了解决 vim 插件 taglist 报错:Error detected while processing function前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

触发场景

a.PHP 标签打开 taglist,然后打开 b.PHP 标签,此时再切回到 a.PHP 标签vim 会报出一下错误信息:

Error detected while processing function <SNR>29_Tlist_Refresh_Folds

解决办法

下载 taglist 补丁:taglist.diff
补丁内容如下:(若不能下载,可以复制此内容

diff --git a/vim/.vim/bundle/taglist/plugin/taglist.vim b/vim/.vim/bundle/taglist/plugin/taglist.vim
index 59901f6..74487a1 100644
--- a/vim/.vim/bundle/taglist/plugin/taglist.vim
+++ b/vim/.vim/bundle/taglist/plugin/taglist.vim
@@ -4097,6 +4097,11 @@ endfunction
 " window. Used after entering a tab. If this is not done,then the folds
 " are not properly created for taglist windows displayed in multiple tabs.
 function! s:Tlist_Refresh_Folds()
+
+    if g:Tlist_Show_One_File
+      return
+    endif
+
     let winnum = bufwinnr(g:TagList_title)
     if winnum == -1
         return

然后,应用此补丁:

patch -p0 ~/.vim/plugged/taglist.vim/plugin/taglist.vim ~/Downloads/taglist.diff

注意: 插件位置由你所用的插件管理器决定,可能跟我不一样。

参考:

原文链接:https://www.f2er.com/bash/389288.html

猜你在找的Bash相关文章