Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for session_autosave_only_with_explicit_session #175

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions autoload/xolox/session.vim
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,10 @@ function! xolox#session#auto_save() " {{{2
if empty(name)
" Get the name of the active session (if any).
let name = xolox#session#find_current_session()
" If the user doesn't want to autosave when there is no session, then stop.
if empty(name) && get(g:, 'session_autosave_only_with_explicit_session', 0) == 1
return
endif
" If no session is active and the user doesn't have any sessions yet,
" help them get started by suggesting to create the default session.
if empty(name) && (empty(xolox#session#get_names(0)) || g:session_default_overwrite)
Expand Down