bookmark: do not error out, if the plugin isn't installed

fixes #1912
This commit is contained in:
Christian Brabandt 2019-05-03 12:37:17 +02:00
parent 715274c3f9
commit cd2884abf1
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
2 changed files with 8 additions and 0 deletions

View File

@ -214,6 +214,7 @@ function! airline#extensions#load()
endif
if get(g:, 'airline#extensions#bookmark#enabled', 1)
\ && exists(':BookmarkToggle')
call airline#extensions#bookmark#init(s:ext)
call add(s:loaded_ext, 'bookmark')
endif

View File

@ -1,6 +1,13 @@
"
" MIT License. Copyright (c) 2019 Bjoern Petri <bjoern.petri@sundevil.de>
"
scriptencoding utf-8
if !exists(':BookmarkToggle')
finish
endif
function! airline#extensions#bookmark#currentbookmark()
if get(w:, 'airline_active', 0)
let file = expand("%:p")