parent
b08d65a967
commit
72c51e773a
|
@ -568,6 +568,11 @@ endfunction
|
|||
|
||||
" Function: s:show_sessions {{{1
|
||||
function! s:show_sessions() abort
|
||||
let limit = get(g:, 'startify_session_number', 999) - 1
|
||||
if limit <= -1
|
||||
return
|
||||
endif
|
||||
|
||||
let sfiles = split(globpath(s:session_dir, '*'), '\n')
|
||||
let sfiles = filter(sfiles, 'v:val !~# "__LAST__$"')
|
||||
let sfiles = filter(sfiles,
|
||||
|
@ -601,6 +606,9 @@ function! s:show_sessions() abort
|
|||
endif
|
||||
call s:register(line('$'), index, 'session', 'SLoad', fname)
|
||||
let b:startify.entry_number += 1
|
||||
if i == limit
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
|
||||
call append('$', '')
|
||||
|
|
|
@ -114,6 +114,7 @@ default values.
|
|||
|g:startify_session_before_save|
|
||||
|g:startify_session_delete_buffers|
|
||||
|g:startify_session_dir|
|
||||
|g:startify_session_number|
|
||||
|g:startify_session_persistence|
|
||||
|g:startify_session_remove_lines|
|
||||
|g:startify_session_savecmds|
|
||||
|
@ -460,6 +461,14 @@ Example:
|
|||
\ 'silent !pdfreader ~/latexproject/main.pdf &'
|
||||
\ ]
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
*g:startify_session_number*
|
||||
>
|
||||
let g:startify_session_number = 999
|
||||
<
|
||||
The maximum number of sessions to display. Makes the most sense together with
|
||||
|g:startify_session_sort|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*g:startify_session_sort*
|
||||
>
|
||||
|
|
Loading…
Reference in a new issue