Explorar o código

Make section highlighting local to buffer

Marco Hinz %!s(int64=12) %!d(string=hai) anos
pai
achega
515bcd48b4
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  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()