Mercurial > vim
diff src/testdir/shared.vim @ 12742:af961e38e508 v8.0.1249
patch 8.0.1249: no error when WaitFor() gets an invalid wrong expression
commit https://github.com/vim/vim/commit/c20e0d52071a3f6e12321ec3344024faa4695da9
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 2 18:19:19 2017 +0100
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 02 Nov 2017 18:30:05 +0100 |
parents | 810a4c3d4f7e |
children | 7f27e9769f62 |
line wrap: on
line diff
--- a/src/testdir/shared.vim +++ b/src/testdir/shared.vim @@ -125,15 +125,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