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

触发场景

clipboard.png

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

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

参考:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值