From 515bcd48b4323e7e1d182085042b81607d2f52a3 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Mon, 2 Dec 2013 21:45:34 +0100 Subject: [PATCH] Make section highlighting local to buffer --- autoload/startify.vim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/autoload/startify.vim b/autoload/startify.vim index 6f59b0e..5557137 100644 --- a/autoload/startify.vim +++ b/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 '. g:startify_empty_buffer_key .' :enew' endif - autocmd startify BufLeave call clearmatches() autocmd startify CursorMoved call s:set_cursor() if s:restore_position autocmd startify BufReadPost * call s:restore_position()