aboutsummaryrefslogtreecommitdiff
path: root/autoload/novim_mode.vim
diff options
context:
space:
mode:
Diffstat (limited to 'autoload/novim_mode.vim')
-rw-r--r--autoload/novim_mode.vim12
1 files changed, 8 insertions, 4 deletions
diff --git a/autoload/novim_mode.vim b/autoload/novim_mode.vim
index f93e29f..90aecc5 100644
--- a/autoload/novim_mode.vim
+++ b/autoload/novim_mode.vim
@@ -44,10 +44,14 @@ function! s:InsertAndSelectionBehaviour()
" Intelligently set/unset insertmode
augroup start_insertmode
autocmd!
- " The timer here delays the call to check whether the current buffer
- " is an editable one. Without the delay, the check is often too early
- " to correctly get the value of `&buftype`, etc.
- autocmd BufEnter * call timer_start(1, {->execute('call s:InsertMode()')})
+ if has('timers') == 1
+ " The timer here delays the call to check whether the current buffer
+ " is an editable one. Without the delay, the check is often too early
+ " to correctly get the value of `&buftype`, etc.
+ autocmd BufEnter * call timer_start(1, {->execute('call s:InsertMode()')})
+ else
+ autocmd BufEnter * call s:InsertMode()
+ endif
augroup END
" Mostly changes the way selection works.