소스 검색

Indicate current session with (*)

References https://github.com/mhinz/vim-startify/issues/361
Marco Hinz 6 년 전
부모
커밋
e4d35cc913
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      autoload/startify.vim

+ 2 - 1
autoload/startify.vim

@@ -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