aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-11-19 22:31:11 -0500
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-11-19 22:32:23 -0500
commitfdc2707b41a0c82bb621c2d437f775690bff45ee (patch)
tree42a3099bb7d9ed8f7373d7dcb2b80f0573427314
parente71f43f8e7beaa0d1ed35b63ea55e43f886a0875 (diff)
downloadrneovim-fdc2707b41a0c82bb621c2d437f775690bff45ee.tar.gz
rneovim-fdc2707b41a0c82bb621c2d437f775690bff45ee.tar.bz2
rneovim-fdc2707b41a0c82bb621c2d437f775690bff45ee.zip
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. https://github.com/vim/vim/commit/c20e0d52071a3f6e12321ec3344024faa4695da9
-rw-r--r--src/nvim/testdir/shared.vim13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/nvim/testdir/shared.vim b/src/nvim/testdir/shared.vim
index a19929e79b..eb6798f353 100644
--- a/src/nvim/testdir/shared.vim
+++ b/src/nvim/testdir/shared.vim
@@ -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