From 4dcc552de20d338b009274b349c3ae8b8753ddb0 Mon Sep 17 00:00:00 2001 From: Dane Summers Date: Fri, 2 Sep 2016 09:36:19 -0400 Subject: [PATCH] Adds support for changing conoline setting when background setting changes --- autoload/conoline.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/autoload/conoline.vim b/autoload/conoline.vim index 4ccc69c..984ebb1 100644 --- a/autoload/conoline.vim +++ b/autoload/conoline.vim @@ -26,6 +26,7 @@ function! conoline#disable() abort autocmd! conoline_only_active_window autocmd! conoline_color_insert autocmd! conoline_color_enable + autocmd! conoline_monitor_background_setting let s:enabled = 0 endfunction @@ -82,6 +83,12 @@ function! conoline#enable() abort autocmd Syntax,ColorScheme * call conoline#enable() augroup END + " Change light/dark when the background changes + augroup conoline_monitor_background_setting + autocmd! + autocmd OptionSet background :if &background == 'light' | execute "ConoLineColorLight" | else | execute "ConoLineColorDark" | endif + augroup END + setlocal cursorline call s:normal() let s:enabled = 1