Skip to content

Commit a55318b

Browse files
committed
Make :ViewSession compatible with console Vim (issue #74)
See issue #74 on GitHub: #74
1 parent 9607a6b commit a55318b

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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 July 20, 2013 at 12:48.
249+
1 Vim scripts on October 15, 2013 at 19:26.
250250

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

autoload/xolox/session.vim

Lines changed: 7 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: July 20, 2013
4+
" Last Change: October 15, 2013
55
" URL: http://peterodding.com/code/vim/session/
66

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

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

@@ -584,7 +584,11 @@ function! xolox#session#view_cmd(name) abort " {{{2
584584
let msg = "session.vim %s: The %s session at %s doesn't exist!"
585585
call xolox#misc#msg#warn(msg, g:xolox#session#version, string(name), fnamemodify(path, ':~'))
586586
else
587-
execute 'tab drop' fnameescape(path)
587+
if has('gui_running')
588+
execute 'tab drop' fnameescape(path)
589+
else
590+
execute 'tabedit' fnameescape(path)
591+
endif
588592
call xolox#misc#msg#info("session.vim %s: Viewing session script %s.", g:xolox#session#version, fnamemodify(path, ':~'))
589593
endif
590594
endif

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-
July 20, 2013 at 12:48.
493+
October 15, 2013 at 19:26.
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]. Š 2013 Peter Odding
709709
<peter@peterodding.com>.
710710

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

0 commit comments

Comments
 (0)