From e73a0114f3926c4853072eeb22f6eda7f1ce9920 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Fri, 15 Jan 2016 12:56:20 +0100 Subject: [PATCH] Add sy#buffer_is_active() Mostly an API function that can be used by other plugins. --- autoload/sy.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autoload/sy.vim b/autoload/sy.vim index bf6bf7a..92e8352 100644 --- a/autoload/sy.vim +++ b/autoload/sy.vim @@ -142,3 +142,8 @@ function! sy#toggle() abort call sy#disable() endif endfunction + +" Function: #buffer_is_active {{{1 +function! sy#buffer_is_active() + return (!exists('b:sy') || !b:sy.active) ? 0 : 1 +endfunction