From a8657753d66eeb4ecbf75949ad668a6cc340b339 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Wed, 17 Dec 2014 12:57:01 +0100 Subject: [PATCH] Avoid unset w:startify_section_header_lines Change w:startify_section_header_lines to b: to avoid it being unset on :split and similar commands. References #137. --- autoload/startify.vim | 6 +++--- syntax/startify.vim | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/autoload/startify.vim b/autoload/startify.vim index baddb7f..af9063f 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -89,7 +89,7 @@ function! startify#insane_in_the_membrane() abort echohl None endif - let w:startify_section_header_lines = [] + let b:startify_section_header_lines = [] let s:lists = get(g:, 'startify_list_order', [ \ [' Most recently used files:'], \ 'files', @@ -505,7 +505,7 @@ function! s:set_cursor() abort let movement = 2 * (s:newline > s:oldline) - 1 " skip section headers lines until an entry is found - while index(w:startify_section_header_lines, s:newline) != -1 + while index(b:startify_section_header_lines, s:newline) != -1 let s:newline += movement endwhile @@ -617,7 +617,7 @@ function! s:print_section_header() abort let curline = line('.') for lnum in range(curline, curline + len(s:last_message) + 1) - call add(w:startify_section_header_lines, lnum) + call add(b:startify_section_header_lines, lnum) endfor call append('$', s:last_message + ['']) diff --git a/syntax/startify.vim b/syntax/startify.vim index df9d6fc..8932e02 100644 --- a/syntax/startify.vim +++ b/syntax/startify.vim @@ -35,8 +35,8 @@ if exists('g:startify_custom_footer') execute 'syntax region StartifyFooter start=/\%'. startify#get_lastline() .'l/ end=/*/' endif -if exists('w:startify_section_header_lines') - for line in w:startify_section_header_lines +if exists('b:startify_section_header_lines') + for line in b:startify_section_header_lines execute 'syntax region StartifySection start=/\%'. line .'l/ end=/$/' endfor endif