Parcourir la source

Do not beep when toggling batch mode

Fixes https://github.com/mhinz/vim-startify/issues/479
Marco Hinz il y a 4 ans
Parent
commit
5ee8914b26
1 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 6 0
      autoload/startify.vim

+ 6 - 0
autoload/startify.vim

@@ -918,6 +918,10 @@ function! startify#set_mark(type, ...) abort
   let index = expand('<cword>')
   setlocal modifiable
 
+  " https://github.com/vim/vim/issues/8053
+  let showmatch = &showmatch
+  let &showmatch = 0
+
   if entry.marked && index[0] == a:type
     let entry.cmd = 'edit'
     let entry.marked = 0
@@ -930,6 +934,8 @@ function! startify#set_mark(type, ...) abort
     execute 'normal! "_ci]'. repeat(a:type, len(index))
   endif
 
+  let &showmatch = showmatch
+
   setlocal nomodifiable nomodified
   " Reset cursor to fixed column, which is important for s:set_cursor().
   call cursor(origline, s:fixed_column)