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.
This commit is contained in:
parent
18cc9ae8cc
commit
a8657753d6
|
@ -89,7 +89,7 @@ function! startify#insane_in_the_membrane() abort
|
||||||
echohl None
|
echohl None
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let w:startify_section_header_lines = []
|
let b:startify_section_header_lines = []
|
||||||
let s:lists = get(g:, 'startify_list_order', [
|
let s:lists = get(g:, 'startify_list_order', [
|
||||||
\ [' Most recently used files:'],
|
\ [' Most recently used files:'],
|
||||||
\ 'files',
|
\ 'files',
|
||||||
|
@ -505,7 +505,7 @@ function! s:set_cursor() abort
|
||||||
let movement = 2 * (s:newline > s:oldline) - 1
|
let movement = 2 * (s:newline > s:oldline) - 1
|
||||||
|
|
||||||
" skip section headers lines until an entry is found
|
" 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
|
let s:newline += movement
|
||||||
endwhile
|
endwhile
|
||||||
|
|
||||||
|
@ -617,7 +617,7 @@ function! s:print_section_header() abort
|
||||||
let curline = line('.')
|
let curline = line('.')
|
||||||
|
|
||||||
for lnum in range(curline, curline + len(s:last_message) + 1)
|
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
|
endfor
|
||||||
|
|
||||||
call append('$', s:last_message + [''])
|
call append('$', s:last_message + [''])
|
||||||
|
|
|
@ -35,8 +35,8 @@ if exists('g:startify_custom_footer')
|
||||||
execute 'syntax region StartifyFooter start=/\%'. startify#get_lastline() .'l/ end=/*/'
|
execute 'syntax region StartifyFooter start=/\%'. startify#get_lastline() .'l/ end=/*/'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if exists('w:startify_section_header_lines')
|
if exists('b:startify_section_header_lines')
|
||||||
for line in w:startify_section_header_lines
|
for line in b:startify_section_header_lines
|
||||||
execute 'syntax region StartifySection start=/\%'. line .'l/ end=/$/'
|
execute 'syntax region StartifySection start=/\%'. line .'l/ end=/$/'
|
||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in a new issue