소스 검색

Do not beep when toggling batch mode

Fixes https://github.com/mhinz/vim-startify/issues/479
Marco Hinz 4 년 전
부모
커밋
5ee8914b26
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  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)