Indicate current session with (*)

References https://github.com/mhinz/vim-startify/issues/361
This commit is contained in:
Marco Hinz 2019-03-22 17:48:49 +01:00
parent 22de49a64c
commit e4d35cc913
No known key found for this signature in database
GPG key ID: 1C980A1B657B4A4F

View file

@ -675,7 +675,8 @@ function! s:show_sessions() abort
for i in range(len(sfiles))
let index = s:get_index_as_string()
let fname = fnamemodify(sfiles[i], ':t')
call append('$', s:padding_left .'['. index .']'. repeat(' ', (3 - strlen(index))) . fname)
let dname = sfiles[i] ==# v:this_session ? fname.' (*)' : fname
call append('$', s:padding_left .'['. index .']'. repeat(' ', (3 - strlen(index))) . dname)
if has('win32')
let fname = substitute(fname, '\[', '\[[]', 'g')
endif