From d9af5b1c13db1eb31dde01c2eaacf54961c4c238 Mon Sep 17 00:00:00 2001 From: Peter Odding Date: Sat, 4 Jun 2011 00:23:25 +0200 Subject: [PATCH] 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). --- autoload/xolox/session.vim | 4 ++-- plugin/session.vim | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/autoload/xolox/session.vim b/autoload/xolox/session.vim index ec4054c..05e11d9 100644 --- a/autoload/xolox/session.vim +++ b/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(':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) diff --git a/plugin/session.vim b/plugin/session.vim index 06f905b..d6a811e 100644 --- a/plugin/session.vim +++ b/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