Skip to content
Snippets Groups Projects
Commit d9af5b1c authored by Peter Odding's avatar Peter Odding
Browse files

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).
parent 28a1eafb
No related branches found
Tags 1.4.6
No related merge requests found
" 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:~')
......@@ -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)
......
" 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment