mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06: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
|
let slept = 0
|
||||||
endif
|
endif
|
||||||
for i in range(timeout / 10)
|
for i in range(timeout / 10)
|
||||||
try
|
if eval(a:expr)
|
||||||
if eval(a:expr)
|
if has('reltime')
|
||||||
if has('reltime')
|
return float2nr(reltimefloat(reltime(start)) * 1000)
|
||||||
return float2nr(reltimefloat(reltime(start)) * 1000)
|
|
||||||
endif
|
|
||||||
return slept
|
|
||||||
endif
|
endif
|
||||||
catch
|
return slept
|
||||||
endtry
|
endif
|
||||||
if !has('reltime')
|
if !has('reltime')
|
||||||
let slept += 10
|
let slept += 10
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user