From 805d6e450a9e658ff7e1d254210983f5667558f7 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 28 Jun 2019 22:20:56 -0400 Subject: vim-patch:8.0.1202: :wall gives an errof for a terminal window Problem: :wall gives an errof for a terminal window. (Marius Gedminas) Solution: Don't try writing a buffer that can't be written. (Yasuhiro Matsumoto, closes vim/vim#2190) https://github.com/vim/vim/commit/059db5c29ffef283a4b90bab9228708fa32e3dd2 --- src/nvim/ex_cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 17b66fd32c..df455399c4 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -1939,7 +1939,7 @@ void do_wqall(exarg_T *eap) } FOR_ALL_BUFFERS(buf) { - if (!bufIsChanged(buf)) { + if (!bufIsChanged(buf) || bt_dontwrite(buf)) { continue; } /* -- cgit From bddc4dc0ed56d8714be340c5f95bea12ceb00255 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 28 Jun 2019 23:46:50 -0400 Subject: vim-patch:8.0.1238: incremental search only shows one match Problem: Incremental search only shows one match. Solution: When 'incsearch' and and 'hlsearch' are both set highlight all matches. (haya14busa, closes vim/vim#2198) https://github.com/vim/vim/commit/2e51d9a0972080b087d566608472928d5b7b35d7 --- src/nvim/testdir/test_search.vim | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/nvim/testdir/test_search.vim b/src/nvim/testdir/test_search.vim index 5e5ec96fd1..8e284ba042 100644 --- a/src/nvim/testdir/test_search.vim +++ b/src/nvim/testdir/test_search.vim @@ -1,5 +1,7 @@ " Test for the search command +source shared.vim + func Test_search_cmdline() " See test/functional/legacy/search_spec.lua throw 'skipped: Nvim does not support test_override()' -- cgit From 489d3b084f2a4c90f49258ddf5b7c9fb5ed8607a Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 28 Jun 2019 23:48:20 -0400 Subject: vim-patch:8.0.1259: search test can be flaky Problem: Search test can be flaky. Solution: Use WaitFor() instead of a delay. Make it possible to pass a funcref to WaitFor() to avoid the need for global variables. (James McCoy, closes vim/vim#2282) https://github.com/vim/vim/commit/13deab8d08145c1f6e2a3e82cb547bc7f87a3686 --- src/nvim/testdir/shared.vim | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/testdir/shared.vim b/src/nvim/testdir/shared.vim index a5cf4def4f..6cc2d06a36 100644 --- a/src/nvim/testdir/shared.vim +++ b/src/nvim/testdir/shared.vim @@ -133,7 +133,9 @@ func s:kill_server(cmd) endif endfunc -" Wait for up to a second for "expr" to become true. +" Wait for up to a second for "expr" to become true. "expr" can be a +" stringified expression to evaluate, or a funcref without arguments. +" " A second argument can be used to specify a different timeout in msec. " " Return time slept in milliseconds. With the +reltime feature this can be @@ -146,8 +148,13 @@ func WaitFor(expr, ...) else let slept = 0 endif + if type(a:expr) == v:t_func + let Test = a:expr + else + let Test = {-> eval(a:expr) } + endif for i in range(timeout / 10) - if eval(a:expr) + if Test() if has('reltime') return float2nr(reltimefloat(reltime(start)) * 1000) endif -- cgit