From cd2884abf1ed1ec5903e81df20faa0df5eba94ad Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Fri, 3 May 2019 12:37:17 +0200 Subject: [PATCH] bookmark: do not error out, if the plugin isn't installed fixes #1912 --- autoload/airline/extensions.vim | 1 + autoload/airline/extensions/bookmark.vim | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/autoload/airline/extensions.vim b/autoload/airline/extensions.vim index 6e1d3ba..84fcdda 100644 --- a/autoload/airline/extensions.vim +++ b/autoload/airline/extensions.vim @@ -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 diff --git a/autoload/airline/extensions/bookmark.vim b/autoload/airline/extensions/bookmark.vim index ce7d8ce..65ebf33 100644 --- a/autoload/airline/extensions/bookmark.vim +++ b/autoload/airline/extensions/bookmark.vim @@ -1,6 +1,13 @@ " " MIT License. Copyright (c) 2019 Bjoern Petri " + +scriptencoding utf-8 + +if !exists(':BookmarkToggle') + finish +endif + function! airline#extensions#bookmark#currentbookmark() if get(w:, 'airline_active', 0) let file = expand("%:p")