Skip to content

Commit

Permalink
Prevent esc delay apparently caused by timers
Browse files Browse the repository at this point in the history
  • Loading branch information
alyosha committed Sep 12, 2020
1 parent 18b316b commit 82ce232
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugin/vimedia.vim
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ if exists('g:vimedia_plugin_loaded')
finish
endif

set timeout timeoutlen=1000 ttimeoutlen=0

"" Point to location of python code
let s:plugin_root_dir = fnamemodify(resolve(expand('<sfile>:p')), ':h')

Expand All @@ -27,7 +29,6 @@ python_root_dir = normpath(join(plugin_root_dir, '..', 'python'))
sys.path.insert(0, python_root_dir)

import vimedia
import util
vmd = vimedia.Vimedia()
EOF

Expand Down Expand Up @@ -101,7 +102,6 @@ endfu

"" Refresh track/artist name and playback ticker every half-second (async)
let timer = timer_start(500, function('s:Refresh'), {'repeat':-1})

"" Update the status line each second with the latest playback info
let timer = timer_start(1000, function('s:UpdateStatusline'), {'repeat':-1})

Expand Down Expand Up @@ -240,4 +240,4 @@ com! -nargs=0 Vol call s:PresentOptions(s:interaction_type_toggle_volume)
com! -nargs=0 SelectPlayer call s:PresentOptions(s:interaction_type_select_player)
com! -nargs=0 ActivePlayer call s:ActivePlayer()

let g:vimedia_plugin_loaded = 1
let g:vimedia_plugin_loaded = 1

0 comments on commit 82ce232

Please sign in to comment.