Skip to content

Commit d9af5b1

Browse files
committed
Ignore missing fonts (reported by SteP)
When the session scripts are stored on a removable drive which is used on multiple computers the session scripts can reference a font which existed on the previous machine but not the current one, causing an E596 error to trigger. SteP also reported that on Windows XP SP3 after the E596 error triggers, Vim becomes unresponsive. I can't reproduce this on my virtual machine running the same version of Windows but I'm hoping this change will also fix that problem (it's my understanding that :silent! and :try/:catch are equivalent in their ability to silence errors).
1 parent 28a1eaf commit d9af5b1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

autoload/xolox/session.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
" Vim script
22
" Author: Peter Odding
3-
" Last Change: June 1, 2011
3+
" Last Change: June 4, 2011
44
" URL: http://peterodding.com/code/vim/session/
55

66
let s:script = expand('<sfile>:p:~')
@@ -19,7 +19,7 @@ function! xolox#session#save_session(commands, filename) " {{{2
1919
call add(a:commands, '" Open this file in Vim and run :source % to restore your session.')
2020
call add(a:commands, '')
2121
call add(a:commands, 'set guioptions=' . escape(&go, ' "\'))
22-
call add(a:commands, 'set guifont=' . escape(&gfn, ' "\'))
22+
call add(a:commands, 'silent! set guifont=' . escape(&gfn, ' "\'))
2323
call xolox#session#save_features(a:commands)
2424
call xolox#session#save_colors(a:commands)
2525
call xolox#session#save_qflist(a:commands)

plugin/session.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
" Vim script
22
" Author: Peter Odding
3-
" Last Change: June 1, 2011
3+
" Last Change: June 4, 2011
44
" URL: http://peterodding.com/code/vim/session/
5-
" Version: 1.4.5
5+
" Version: 1.4.6
66

77
" Support for automatic update using the GLVS plug-in.
88
" GetLatestVimScripts: 3150 1 :AutoInstall: session.zip

0 commit comments

Comments
 (0)