Browse Source

Sessions: only prune unlisted buffers from arglist

References #110.
Marco Hinz 11 years ago
parent
commit
af2368cd75
1 changed files with 5 additions and 1 deletions
  1. 5 1
      autoload/startify.vim

+ 5 - 1
autoload/startify.vim

@@ -234,7 +234,11 @@ function! startify#session_write(spath)
       unlet s:callingbuffer
     endif
     " prevent saving already deleted buffers that were in the arglist
-    silent! argdelete *
+    for arg in argv()
+      if !buflisted(arg)
+        execute 'argdelete' fnameescape(arg)
+      endif
+    endfor
     set sessionoptions-=options
     execute 'mksession!' a:spath
   catch