forked from aniani/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.
This commit is contained in:
parent
5130f31661
commit
c20e0d5207
@ -125,15 +125,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
|
endif
|
||||||
return slept
|
return slept
|
||||||
endif
|
endif
|
||||||
catch
|
|
||||||
endtry
|
|
||||||
if !has('reltime')
|
if !has('reltime')
|
||||||
let slept += 10
|
let slept += 10
|
||||||
endif
|
endif
|
||||||
|
@ -19,6 +19,7 @@ endfunc
|
|||||||
|
|
||||||
func Nb_basic(port)
|
func Nb_basic(port)
|
||||||
call delete("Xnetbeans")
|
call delete("Xnetbeans")
|
||||||
|
call writefile([], "Xnetbeans")
|
||||||
exe 'nbstart :localhost:' . a:port . ':bunny'
|
exe 'nbstart :localhost:' . a:port . ':bunny'
|
||||||
call assert_true(has("netbeans_enabled"))
|
call assert_true(has("netbeans_enabled"))
|
||||||
|
|
||||||
@ -53,6 +54,9 @@ func Test_nb_basic()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Nb_file_auth(port)
|
func Nb_file_auth(port)
|
||||||
|
call delete("Xnetbeans")
|
||||||
|
call writefile([], "Xnetbeans")
|
||||||
|
|
||||||
call assert_fails('nbstart =notexist', 'E660:')
|
call assert_fails('nbstart =notexist', 'E660:')
|
||||||
call writefile(['host=localhost', 'port=' . a:port, 'auth=bunny'], 'Xnbauth')
|
call writefile(['host=localhost', 'port=' . a:port, 'auth=bunny'], 'Xnbauth')
|
||||||
if has('unix')
|
if has('unix')
|
||||||
|
@ -761,6 +761,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1249,
|
||||||
/**/
|
/**/
|
||||||
1248,
|
1248,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user