Skip to content

Commit e365e75

Browse files
committed
Bug fix: Disable :argglobal/:argument commands just like :args
1 parent cacf986 commit e365e75

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

autoload/xolox/session.vim

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
" Vim script
22
" Author: Peter Odding
3-
" Last Change: April 17, 2013
3+
" Last Change: April 18, 2013
44
" URL: http://peterodding.com/code/vim/session/
55

6-
let g:xolox#session#version = '1.5.1'
6+
let g:xolox#session#version = '1.5.2'
77

88
" Public API for session persistence. {{{1
99

@@ -137,6 +137,11 @@ function! s:state_filter(line)
137137
" given, thereby breaking the session that the user was expecting to
138138
" get... I consider this to be a bug in :mksession, but anyway :-).
139139
return '" ' . a:line
140+
elseif a:line =~ '^\(argglobal\|\dargu\)$'
141+
" Because we disabled the :args command above we cause a potential error
142+
" when :mksession adds corresponding :argglobal and/or :argument commands
143+
" to the session script.
144+
return '" ' . a:line
140145
else
141146
return a:line
142147
endif

0 commit comments

Comments
 (0)