Skip to content

Commit 1f576c1

Browse files
committed
Merge pull request #82: Remove -count=94919 workaround for :AppendTabSession
2 parents a55318b + de89506 commit 1f576c1

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ Your session script will be saved in the directory pointed to by the `g:session_
4747
This command is basically [:source][source] in disguise, but it supports tab completion of session names and it executes `:CloseSession` before opening the session. When you don't provide a session name and only a single session exists then that session is opened, otherwise the plug-in will ask you to select one from a list:
4848

4949
Please select the session to restore:
50-
50+
5151
1. vim-profile
5252
2. session-plugin
5353
3. etc.
54-
54+
5555
Type number and <Enter> or click with mouse (empty cancels):
5656

5757
If the session you're trying to open is already active in another Vim instance you'll get a warning and nothing happens. You can use a bang (!) as in `:OpenSession! ...` to ignore the warning and open the session anyway.
@@ -246,7 +246,7 @@ Recently this plug-in switched from reimplementing [:mksession][mksession] to ac
246246
<!-- Start of generated documentation -->
247247

248248
The documentation of the 34 functions below was extracted from
249-
1 Vim scripts on October 15, 2013 at 19:26.
249+
1 Vim scripts on June 17, 2014 at 21:34.
250250

251251
### Public API for the vim-session plug-in
252252

@@ -451,8 +451,8 @@ If you have questions, bug reports, suggestions, etc. the author can be contacte
451451

452452
## License
453453

454-
This software is licensed under the [MIT license](http://en.wikipedia.org/wiki/MIT_License).
455-
© 2013 Peter Odding &lt;<peter@peterodding.com>&gt;.
454+
This software is licensed under the [MIT license](http://en.wikipedia.org/wiki/MIT_License).
455+
© 2014 Peter Odding &lt;<peter@peterodding.com>&gt;.
456456

457457
## Sample session script
458458

@@ -461,7 +461,7 @@ Here's an example session script generated by the vim-session plug-in while I wa
461461
" ~/.vim/sessions/example.vim: Vim session script.
462462
" Created by session.vim on 30 August 2010 at 05:26:28.
463463
" Open this file in Vim and run :source % to restore your session.
464-
464+
465465
set guioptions=aegit
466466
set guifont=Monaco\ 13
467467
if exists('g:syntax_on') != 1 | syntax on | endif

autoload/xolox/session.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
" Public API for the vim-session plug-in.
22
"
33
" Author: Peter Odding
4-
" Last Change: October 15, 2013
4+
" Last Change: June 17, 2014
55
" URL: http://peterodding.com/code/vim/session/
66

7-
let g:xolox#session#version = '2.4.9'
7+
let g:xolox#session#version = '2.4.10'
88

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

@@ -729,7 +729,7 @@ endfunction
729729
function! xolox#session#append_tab_cmd(name, bang, count, command) abort " {{{2
730730
try
731731
call xolox#session#change_tab_options()
732-
execute printf('%stabnew', a:count == 94919 ? '' : a:count)
732+
execute printf('%stabnew', a:count == -1 ? '' : a:count)
733733
call xolox#session#open_cmd(a:name, a:bang, a:command)
734734
finally
735735
call xolox#session#restore_tab_options()

doc/session.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ might take a while...)
490490
Function reference ~
491491

492492
The documentation of the 34 functions below was extracted from 1 Vim scripts on
493-
October 15, 2013 at 19:26.
493+
June 17, 2014 at 21:34.
494494

495495
-------------------------------------------------------------------------------
496496
*public-api-for-vim-session-plug-in*
@@ -705,7 +705,7 @@ session. If you like the script please vote for it on Vim Online [19].
705705
*session-license*
706706
License ~
707707

708-
This software is licensed under the MIT license [20]. Š 2013 Peter Odding
708+
This software is licensed under the MIT license [20]. Š 2014 Peter Odding
709709
<peter@peterodding.com>.
710710

711711
===============================================================================

plugin/session.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ command! -bar -bang CloseSession call xolox#session#close_cmd(<q-bang>, 0, 1, 'C
165165
" sessions (used to persist/restore the window layout of a single tab page).
166166
command! -bar -bang -nargs=? -complete=customlist,xolox#session#complete_names OpenTabSession call xolox#session#open_tab_cmd(<q-args>, <q-bang>, 'OpenTabSession')
167167
command! -bar -bang -nargs=? -complete=customlist,xolox#session#complete_names SaveTabSession call xolox#session#save_tab_cmd(<q-args>, <q-bang>, 'SaveTabSession')
168-
command! -bar -bang -count=94919 -nargs=? -complete=customlist,xolox#session#complete_names AppendTabSession call xolox#session#append_tab_cmd(<q-args>, <q-bang>, <count>, 'AppendTabSession')
168+
command! -bar -bang -range=-1 -nargs=? -complete=customlist,xolox#session#complete_names AppendTabSession call xolox#session#append_tab_cmd(<q-args>, <q-bang>, <count>, 'AppendTabSession')
169169
command! -bar -bang CloseTabSession call xolox#session#close_tab_cmd(<q-bang>, 'CloseTabSession')
170170

171171
" Define a command to restart Vim editing sessions.
@@ -183,7 +183,7 @@ if g:session_command_aliases
183183
command! -bar -bang SessionClose call xolox#session#close_cmd(<q-bang>, 0, 1, 'SessionClose')
184184
command! -bar -bang -nargs=? -complete=customlist,xolox#session#complete_names SessionTabOpen call xolox#session#open_tab_cmd(<q-args>, <q-bang>, 'SessionTabOpen')
185185
command! -bar -bang -nargs=? -complete=customlist,xolox#session#complete_names SessionTabSave call xolox#session#save_tab_cmd(<q-args>, <q-bang>, 'SessionTabSave')
186-
command! -bar -bang -count=94919 -nargs=? -complete=customlist,xolox#session#complete_names SessionTabAppend call xolox#session#append_tab_cmd(<q-args>, <q-bang>, <count>, 'SessionTabAppend')
186+
command! -bar -bang -range=-1 -nargs=? -complete=customlist,xolox#session#complete_names SessionTabAppend call xolox#session#append_tab_cmd(<q-args>, <q-bang>, <count>, 'SessionTabAppend')
187187
command! -bar -bang SessionTabClose call xolox#session#close_tab_cmd(<q-bang>, 'SessionTabClose')
188188
endif
189189

0 commit comments

Comments
 (0)