1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 10:20:05 +08:00

Fix: enable clean startup in VimR (#3547)

This is a follow-on to #1651; I found that I was still seeing the error message
mentioned in that PR under VimR 0.32.0.  Fortunately VimR has a specific
feature `gui_vimr` to test against; recent builds of VimR do set `gui_running`,
so the fix from that previous PR no longer works.
This commit is contained in:
Steve Huff 2020-05-22 22:18:42 -04:00 committed by GitHub
parent f5ac4fcdec
commit 276d761ae2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 9 deletions

View File

@ -21,14 +21,22 @@ function! SpaceVim#default#options() abort
set guioptions-=b " Hide bottom scrollbar
set showtabline=0 " Hide tabline
set guioptions-=e " Hide tab
if s:SYSTEM.isWindows
" please install the font in 'Dotfiles\font'
set guifont=DejaVu_Sans_Mono_for_Powerline:h11:cANSI:qDRAFT
elseif s:SYSTEM.isOSX
set guifont=DejaVu\ Sans\ Mono\ for\ Powerline:h11
else
set guifont=DejaVu\ Sans\ Mono\ for\ Powerline\ 11
endif
try
if s:SYSTEM.isWindows
" please install the font in 'Dotfiles\font'
set guifont=DejaVu_Sans_Mono_for_Powerline:h11:cANSI:qDRAFT
elseif s:SYSTEM.isOSX
set guifont=DejaVu\ Sans\ Mono\ for\ Powerline:h11
else
set guifont=DejaVu\ Sans\ Mono\ for\ Powerline\ 11
endif
catch /^Vim\%((\a\+)\)\=:E518/
if has('gui_vimr')
" VimR has disabled support for guifont
else
throw v:exception
endif
endtry
endif
" indent use backspace delete indent, eol use backspace delete line at

View File

@ -29,5 +29,9 @@ if g:spacevim_hiddenfileinfo == 1 && has('patch-7.4.1570')
set shortmess+=F
endif
if has('gui_running') && !empty(g:spacevim_guifont)
let &guifont = g:spacevim_guifont
if has('gui_vimr')
" VimR has removed support for guifont
else
let &guifont = g:spacevim_guifont
endif
endif