Errors when using netrw
Closed this issue · 9 comments
I can reproduce this in a nearly-pure Vim install, with a minimal .vimrc
, only using Vundle and bufkill.
Error:
Error detected while processing function <SNR>12_BufKill[118]..<SNR>12_GotoBuffer:
line 105:
E684: list index out of range: 0
E15: Invalid expression: w:BufKillColumnList[w:BufKillIndex]
line 107:
E121: Undefined variable: newColumn
E116: Invalid arguments for function <SNR>12_Debug
line 118:
E684: list index out of range: 0
- Start Vim
- Enter
:e.
- Select a plain text file from the current directory
- Enter
:BW
Here is my .vimrc
in its entirety:
set nocompatible
set encoding=utf-8
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'qpkorr/vim-bufkill'
call vundle#end()
syntax enable
filetype plugin indent on
Here is ls -R
on my .vim
directory in its entirety:
bundle pants.txt vimrc
./bundle:
Vundle.vim vim-bufkill
./bundle/Vundle.vim:
CONTRIBUTING.md LICENSE-MIT.txt README.md README_ZH_CN.md README_ZH_TW.md autoload changelog.md doc ftplugin syntax test
./bundle/Vundle.vim/autoload:
vundle vundle.vim
./bundle/Vundle.vim/autoload/vundle:
config.vim installer.vim scripts.vim
./bundle/Vundle.vim/doc:
tags vundle.txt
./bundle/Vundle.vim/ftplugin:
vundlelog.vim
./bundle/Vundle.vim/syntax:
vundlelog.vim
./bundle/Vundle.vim/test:
files minirc.vim vimrc
./bundle/Vundle.vim/test/files:
test.erl
./bundle/vim-bufkill:
README.md doc plugin
./bundle/vim-bufkill/doc:
bufkill.txt tags
./bundle/vim-bufkill/plugin:
bufkill.vim
Output of vim --version
:
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Oct 28 2016 14:13:11)
MacOS X (unix) version
Included patches: 1-3
Compiled by MacPorts
Huge version without GUI. Features included (+) or not (-):
+acl +file_in_path +mouse_sgr +tag_old_static
+arabic +find_in_path -mouse_sysmouse -tag_any_white
+autocmd +float +mouse_urxvt +tcl
-balloon_eval +folding +mouse_xterm +termguicolors
-browse -footer +multi_byte +terminfo
++builtin_terms +fork() +multi_lang +termresponse
+byte_offset +gettext -mzscheme +textobjects
+channel -hangul_input +netbeans_intg +timers
+cindent +iconv +num64 +title
+clientserver +insert_expand +packages -toolbar
+clipboard +job +path_extra +user_commands
+cmdline_compl +jumplist +perl +vertsplit
+cmdline_hist +keymap +persistent_undo +virtualedit
+cmdline_info +lambda +postscript +visual
+comments +langmap +printer +visualextra
+conceal +libcall +profile +viminfo
+cryptv +linebreak +python/dyn +vreplace
+cscope +lispindent +python3/dyn +wildignore
+cursorbind +listcmds +quickfix +wildmenu
+cursorshape +localmap +reltime +windows
+dialog_con +lua +rightleft +writebackup
+diff +menu +ruby +X11
+digraphs +mksession +scrollbind +xfontset
-dnd +modify_fname +signs -xim
-ebcdic +mouse +smartindent -xpm
+emacs_tags -mouseshape +startuptime +xsmp_interact
+eval +mouse_dec +statusline +xterm_clipboard
+ex_extra -mouse_gpm -sun_workshop -xterm_save
+extra_search -mouse_jsbterm +syntax
+farsi +mouse_netterm +tag_binary
system vimrc file: "/opt/local/etc/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/opt/local/share/vim"
Compilation: /usr/bin/clang -c -I. -Iproto -DHAVE_CONFIG_H -I/opt/local/include -DMACOS_X_UNIX -pipe -Os -arch x86_64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -I/opt/local/include
Linking: /usr/bin/clang -L/opt/local/lib -L. -L/opt/local/lib -Wl,-headerpad_max_install_names -fstack-protector -L/opt/local/lib -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -o vim -lXt -lX11 -lSM -lICE -lncurses -liconv -lintl -framework Cocoa -L/opt/local/lib -llua -mmacosx-version-min=10.11 -L/opt/local/lib -Wl,-headerpad_max_install_names -fstack-protector-strong -L/opt/local/lib/perl5/5.24/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -L/opt/local/lib -ltcl8.6 -lz -framework CoreFoundation -lruby.2.2.0 -lobjc -L/opt/local/lib
Thanks - I didn't know Vim 8.0 was available until your post. Given it's only 10 days old, it might be a bug in Vim as it works for me in Vim 7 - but more likely Vim 8 is just stricter about something I suppose. I'll try installing Vim 8 soon and see if I can reproduce it.
Cheers,
John
What version of bufkill (in the plugin/bufkill.vim file)? (I've tried reproducing your error on Windows Vim 8 but can't, and currently Vundle is refusing to install properly to test with your vimrc file)
Can reproduce with the ubuntu vim:
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jul 26 2017 20:13:43)
Included patches: 1-197, 322, 377-378, 422, 550
bufkill.vim says:
3 " Version:>.1.12
4 " Last Change:>.10 May 2015
but I'm running git rev 0cb3672
I poked a little more with Debug mode. Looks like the killcolumn list seems to be missing something (its out of sync with the buffer list).
I made a fork that simply ignores the kill column if it's out of sync: https://github.com/emarcotte/vim-bufkill/commit/949b454c1f40bc38d2bbd60336a140d71e260b6b
I still get other errors though so it's still a work in progress (if you leave a netrw buffer open and try to close it, you hit the please notify author warning)
@emarcotte - thank you - I still can't reproduce the error with the commands above - though if I stuff around enough, I can produce it - but I'm yet to produce it reliably enough to debug it. If you're interested, @mortonfox did some debugging which might, perhaps, help with this issue, and I just merged his fix. If you're dissatisfied with your own... you could give his a try.
Sorry for the delay, just switched back to your repo's version and it actually seems a fair bit quieter than before. Thanks.
@emarcotte FYI there's been some discussion about extraneous warnings of late and I submitted a fix for one of them - makes me curious if it might be quieter still for you now
It's been a long time since I've seen an error from this. I don't even remember the last time I saw one of these warnings/errors and I'm in and out of netrw and vim all day :)
Thanks @emarcotte - I'll close this for now then :)