Преглед изворни кода

Make section highlighting local to buffer

Marco Hinz пре 12 година
родитељ
комит
515bcd48b4
1 измењених фајлова са 1 додато и 2 уклоњено
  1. 1 2
      autoload/startify.vim

+ 1 - 2
autoload/startify.vim

@@ -103,7 +103,7 @@ function! startify#insane_in_the_membrane() abort
   silent $delete _
 
   for item in s:section_header_lines
-    call matchadd('StartifySection', '\%'. item .'l', -1)
+    execute 'syntax region StartifySection start=/\%'. item .'l/ end=/$/'
   endfor
 
   if s:show_special
@@ -134,7 +134,6 @@ function! startify#insane_in_the_membrane() abort
     execute 'nnoremap <buffer><silent> '. g:startify_empty_buffer_key .' :enew<cr>'
   endif
 
-  autocmd startify BufLeave    <buffer> call clearmatches()
   autocmd startify CursorMoved <buffer> call s:set_cursor()
   if s:restore_position
     autocmd startify BufReadPost * call s:restore_position()