Skip to content

Commit

Permalink
fix issue #241
Browse files Browse the repository at this point in the history
  • Loading branch information
Yggdroot committed Nov 14, 2018
1 parent 8875cfa commit 20a982e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions autoload/leaderf/python/leaderf/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,12 @@ def input(self, callback):
self._idle = False

if lfEval("g:Lf_CursorBlink") == '1':
callback()
time.sleep(0.001) # cpu usage 100% without sleep
try:
callback()
time.sleep(0.001) # cpu usage 100% without sleep
except Exception as e:
lfPrintError(e)
break

if lfEval("g:Lf_CursorBlink") == '1':
lfCmd("let nr = getchar(1)")
Expand Down

0 comments on commit 20a982e

Please sign in to comment.