Browse Source

Sessions: only prune unlisted buffers from arglist

References #110.
Marco Hinz 11 năm trước cách đây
mục cha
commit
af2368cd75
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  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