Skip to content

Commit 181cf69

Browse files
committed
Fix --servername option when using vim-startify (Issue #115)
1 parent 46d8732 commit 181cf69

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

autoload/xolox/session.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,11 @@ function! xolox#session#auto_load() " {{{2
386386
return
387387
endif
388388
" Check that the user has started Vim without editing any files.
389+
let current_buffer_is_startify = exists('b:current_syntax') && b:current_syntax == 'startify'
389390
let current_buffer_is_empty = (&modified == 0 && getline(1, '$') == [''])
390391
let buffer_list_is_empty = (bufname('%') == '' && empty(filter(range(1, bufnr('$')), 'buflisted(v:val) && v:val != ' . bufnr(''))))
391392
let buffer_list_is_persistent = (index(xolox#misc#option#split(&viminfo), '%') >= 0)
392-
if current_buffer_is_empty && (buffer_list_is_empty || buffer_list_is_persistent)
393+
if (current_buffer_is_empty || current_buffer_is_startify) && (buffer_list_is_empty || buffer_list_is_persistent)
393394
" Check whether a session matching the user-specified server name exists.
394395
if v:servername !~ '^\cgvim\d*$'
395396
for session in xolox#session#get_names(0)

0 commit comments

Comments
 (0)