From 70939c41f37173873096ec7cd5ad45e32f84b0cb Mon Sep 17 00:00:00 2001 From: Thomas Buckley-Houston Date: Sun, 25 Jun 2017 21:29:47 +0700 Subject: Actually compare `has('timers')` to something :/ This properly deals with versions of VIm that don't support timers. So that older versions of Vim still work but run into the bug where some panes get insertmode inappropriately set. Touches #4 --- plugin/novim_mode.vim | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'plugin') diff --git a/plugin/novim_mode.vim b/plugin/novim_mode.vim index 97d61c6..c30d5de 100644 --- a/plugin/novim_mode.vim +++ b/plugin/novim_mode.vim @@ -37,12 +37,14 @@ endfunction call s:init_settings(s:settings) -" Plugin entry point -if has('timers') - call g:novim_mode#StartNoVimMode() -else - echo 'Novim-mode will not work this version of Vim (no `timer` support).' +if has('timers') == 0 + echo "Novim-mode: Your Vim version (Vim <7.5 or Neovim <0.1.5) doesn't " + echo "support `timer()`, which causes a bug where Insert Mode is " + echo "innapropriately set for some panes." endif +" Plugin entry point +call g:novim_mode#StartNoVimMode() + let &cpo = s:save_cpo unlet s:save_cpo -- cgit v1.2.3-70-g09d2