From eacd402a521314028890de4e49a0d9a12e02d8bc Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Thu, 17 Oct 2013 12:40:18 +0200 Subject: [PATCH] Sessions: don't save options sessionoptions=options is a source of many problems. Startify disables it temporarily. References #49. --- autoload/startify.vim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/autoload/startify.vim b/autoload/startify.vim index b637fc5..3243cf8 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -520,7 +520,15 @@ endfunction " Function: s:session_write {{{1 function! s:session_write(spath) - execute 'mksession!' a:spath + let ssop = &sessionoptions + try + set sessionoptions-=options + execute 'mksession!' a:spath + catch + execute 'echoerr' string(v:exception) + finally + let &sessionoptions = ssop + endtry if exists('g:startify_session_savevars') || exists('g:startify_session_savecmds') execute 'split' a:spath