From 11cd15d2182e37f87163fef724ce9114028129ea Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Thu, 25 Apr 2019 07:41:56 +0200 Subject: [PATCH] async: fnameescape filename A buffer name wich special characters such as Command-T [Files] will cause E94 when trying to call setbufvar() on it. That is because the '[]' is special in buffer names. Therefore, fnameescape the buffer name. This should prevent 'E94: No matching buffer for /home/louis/git/minivimrc/Command-T [Files]' errors. closes #1906 --- autoload/airline/async.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/airline/async.vim b/autoload/airline/async.vim index 052e0f4..3e8f8d7 100644 --- a/autoload/airline/async.vim +++ b/autoload/airline/async.vim @@ -67,9 +67,9 @@ endfunction function! s:on_exit_clean(...) dict abort let buf=self.buf if !empty(buf) - let var=getbufvar(self.file, 'buffer_vcs_config', {}) + let var=getbufvar(fnameescape(self.file), 'buffer_vcs_config', {}) let var[self.vcs].dirty=1 - call setbufvar(self.file, 'buffer_vcs_config', var) + call setbufvar(fnameescape(self.file), 'buffer_vcs_config', var) unlet! b:airline_head endif if has_key(get(s:clean_jobs, 'self.vcs', {}), self.file)