diff options
author | Bram Moolenaar <Bram@vim.org> | 2008-06-24 21:56:24 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2008-06-24 21:56:24 +0000 |
commit | 446cb837a017fc1c1b144cb5c2a35cb90abfbbcf (patch) | |
tree | 6c1fe56f2db8d4adbeee792b181b0659c4d1f216 /runtime/syntax/colortest.vim | |
parent | 3577c6fafb77da5419cd1001dac56f204d480bdc (diff) |
updated for version 7.2a
Diffstat (limited to 'runtime/syntax/colortest.vim')
-rw-r--r-- | runtime/syntax/colortest.vim | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/runtime/syntax/colortest.vim b/runtime/syntax/colortest.vim index 377eba98fe..58de7aaf13 100644 --- a/runtime/syntax/colortest.vim +++ b/runtime/syntax/colortest.vim @@ -1,7 +1,7 @@ " Vim script for testing colors " Maintainer: Bram Moolenaar <Bram@vim.org> " Contributors: Rafael Garcia-Suarez, Charles Campbell -" Last Change: 2006 Feb 20 +" Last Change: 2008 Jun 04 " edit this file, then do ":source %", and check if the colors match @@ -55,11 +55,18 @@ " Open this file in a window if it isn't edited yet. " Use the current window if it's empty. if expand('%:p') != expand('<sfile>:p') + let s:fname = expand('<sfile>') + if exists('*fnameescape') + let s:fname = fnameescape(s:fname) + else + let s:fname = escape(s:fname, ' \|') + endif if &mod || line('$') != 1 || getline(1) != '' - exe "new " . expand('<sfile>') + exe "new " . s:fname else - exe "edit " . expand('<sfile>') + exe "edit " . s:fname endif + unlet s:fname endif syn clear |