mirror of
https://github.com/neovim/neovim.git
synced 2024-12-30 17:07:55 -07:00
vim-patch:8.0.1249: no error when WaitFor() gets an invalid wrong expression
Problem: No error when WaitFor() gets an invalid wrong expression.
Solution: Do not ignore errors in evaluationg the expression. Fix places
where the expression was wrong.
c20e0d5207
This commit is contained in:
parent
e71f43f8e7
commit
fdc2707b41
@ -145,15 +145,12 @@ func WaitFor(expr, ...)
|
||||
let slept = 0
|
||||
endif
|
||||
for i in range(timeout / 10)
|
||||
try
|
||||
if eval(a:expr)
|
||||
if has('reltime')
|
||||
return float2nr(reltimefloat(reltime(start)) * 1000)
|
||||
endif
|
||||
return slept
|
||||
if eval(a:expr)
|
||||
if has('reltime')
|
||||
return float2nr(reltimefloat(reltime(start)) * 1000)
|
||||
endif
|
||||
catch
|
||||
endtry
|
||||
return slept
|
||||
endif
|
||||
if !has('reltime')
|
||||
let slept += 10
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user