|
|
@@ -33,7 +33,7 @@ let s:sep = startify#get_separator()
|
|
|
|
|
|
" Function: #get_lastline {{{1
|
|
|
function! startify#get_lastline() abort
|
|
|
- return s:lastline
|
|
|
+ return s:lastline + 1
|
|
|
endfunction
|
|
|
|
|
|
" Function: #insane_in_the_membrane {{{1
|
|
|
@@ -51,7 +51,6 @@ function! startify#insane_in_the_membrane() abort
|
|
|
endif
|
|
|
|
|
|
enew
|
|
|
- set filetype=startify
|
|
|
setlocal
|
|
|
\ bufhidden=wipe
|
|
|
\ buftype=nofile
|
|
|
@@ -91,7 +90,7 @@ function! startify#insane_in_the_membrane() abort
|
|
|
echohl None
|
|
|
endif
|
|
|
|
|
|
- let s:section_header_lines = []
|
|
|
+ let w:startify_section_header_lines = []
|
|
|
let s:lists = get(g:, 'startify_list_order', [
|
|
|
\ [' Last recently opened files:'],
|
|
|
\ 'files',
|
|
|
@@ -114,10 +113,6 @@ function! startify#insane_in_the_membrane() abort
|
|
|
|
|
|
silent $delete _
|
|
|
|
|
|
- for item in s:section_header_lines
|
|
|
- execute 'syntax region StartifySection start=/\%'. item .'l/ end=/$/'
|
|
|
- endfor
|
|
|
-
|
|
|
if s:show_special
|
|
|
call append('$', ['', ' [q] <quit>'])
|
|
|
endif
|
|
|
@@ -155,6 +150,7 @@ function! startify#insane_in_the_membrane() abort
|
|
|
call cursor(s:firstline + (s:show_special ? 2 : 0), 5)
|
|
|
|
|
|
autocmd startify CursorMoved <buffer> call s:set_cursor()
|
|
|
+ set filetype=startify
|
|
|
silent! doautocmd <nomodeline> User Startified
|
|
|
endfunction
|
|
|
|
|
|
@@ -492,7 +488,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(s:section_header_lines, s:newline) != -1
|
|
|
+ while index(w:startify_section_header_lines, s:newline) != -1
|
|
|
let s:newline += movement
|
|
|
endwhile
|
|
|
|
|
|
@@ -650,7 +646,7 @@ function! s:print_section_header() abort
|
|
|
let curline = line('.')
|
|
|
|
|
|
for lnum in range(curline, curline + len(s:last_message) + 1)
|
|
|
- call add(s:section_header_lines, lnum)
|
|
|
+ call add(w:startify_section_header_lines, lnum)
|
|
|
endfor
|
|
|
|
|
|
call append('$', s:last_message + [''])
|