Skip to content

Commit

Permalink
Ignore missing fonts (reported by SteP)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
xolox committed Jun 3, 2011
1 parent 28a1eaf commit d9af5b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions autoload/xolox/session.vim
@@ -1,6 +1,6 @@
" Vim script
" Author: Peter Odding
" Last Change: June 1, 2011
" Last Change: June 4, 2011
" URL: http://peterodding.com/code/vim/session/

let s:script = expand('<sfile>:p:~')
Expand All @@ -19,7 +19,7 @@ function! xolox#session#save_session(commands, filename) " {{{2
call add(a:commands, '" Open this file in Vim and run :source % to restore your session.')
call add(a:commands, '')
call add(a:commands, 'set guioptions=' . escape(&go, ' "\'))
call add(a:commands, 'set guifont=' . escape(&gfn, ' "\'))
call add(a:commands, 'silent! set guifont=' . escape(&gfn, ' "\'))
call xolox#session#save_features(a:commands)
call xolox#session#save_colors(a:commands)
call xolox#session#save_qflist(a:commands)
Expand Down
4 changes: 2 additions & 2 deletions plugin/session.vim
@@ -1,8 +1,8 @@
" Vim script
" Author: Peter Odding
" Last Change: June 1, 2011
" Last Change: June 4, 2011
" URL: http://peterodding.com/code/vim/session/
" Version: 1.4.5
" Version: 1.4.6

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

0 comments on commit d9af5b1

Please sign in to comment.