Nvim: old versions don't have stdpath() yet

Fixes https://github.com/mhinz/vim-startify/issues/356
This commit is contained in:
Marco Hinz 2019-02-15 19:17:07 +01:00
parent ed655d5e1c
commit bb16fe8d10
No known key found for this signature in database
GPG key ID: 1C980A1B657B4A4F

View file

@ -1031,13 +1031,13 @@ function! s:get_session_path() abort
if exists('g:startify_session_dir')
let path = g:startify_session_dir
elseif has('nvim')
let path = stdpath('data') . s:sep . 'session'
let path = has('nvim-0.3.1')
\ ? stdpath('data') . s:sep . 'session'
\ : '~/.local/share/nvim/session'
else
if has('win32')
let path = '$HOME\vimfiles\session'
else
let path = '~/.vim/session'
endif
let path = has('win32')
\ ? '$HOME\vimfiles\session'
\ : '~/.vim/session'
endif
return resolve(expand(path))