aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/eval.c18
-rw-r--r--src/nvim/ex_eval.h2
-rw-r--r--src/nvim/message.c4
-rw-r--r--src/nvim/screen.c6
-rw-r--r--src/nvim/testdir/shared.vim4
-rw-r--r--src/nvim/testdir/test_clientserver.vim2
-rw-r--r--src/nvim/testdir/test_quotestar.vim8
-rw-r--r--test/functional/ui/embed_spec.lua14
8 files changed, 36 insertions, 22 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 79e67f6d7b..683d44a245 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -3366,15 +3366,15 @@ static int pattern_match(char_u *pat, char_u *text, int ic)
* types for expressions.
*/
typedef enum {
- TYPE_UNKNOWN = 0
- , TYPE_EQUAL /* == */
- , TYPE_NEQUAL /* != */
- , TYPE_GREATER /* > */
- , TYPE_GEQUAL /* >= */
- , TYPE_SMALLER /* < */
- , TYPE_SEQUAL /* <= */
- , TYPE_MATCH /* =~ */
- , TYPE_NOMATCH /* !~ */
+ TYPE_UNKNOWN = 0,
+ TYPE_EQUAL, // ==
+ TYPE_NEQUAL, // !=
+ TYPE_GREATER, // >
+ TYPE_GEQUAL, // >=
+ TYPE_SMALLER, // <
+ TYPE_SEQUAL, // <=
+ TYPE_MATCH, // =~
+ TYPE_NOMATCH, // !~
} exptype_T;
// TODO(ZyX-I): move to eval/expressions
diff --git a/src/nvim/ex_eval.h b/src/nvim/ex_eval.h
index d5f8737bf3..2237b6aca3 100644
--- a/src/nvim/ex_eval.h
+++ b/src/nvim/ex_eval.h
@@ -94,7 +94,7 @@ typedef enum
{
ET_USER, // exception caused by ":throw" command
ET_ERROR, // error exception
- ET_INTERRUPT // interrupt exception triggered by Ctrl-C
+ ET_INTERRUPT, // interrupt exception triggered by Ctrl-C
} except_type_T;
/*
diff --git a/src/nvim/message.c b/src/nvim/message.c
index 2354cce2b7..ac731210d7 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -154,8 +154,8 @@ void msg_grid_validate(void)
{
grid_assign_handle(&msg_grid);
bool should_alloc = msg_dothrottle();
- if (msg_grid.Rows != Rows || msg_grid.Columns != Columns
- || (should_alloc && !msg_grid.chars)) {
+ if (should_alloc && (msg_grid.Rows != Rows || msg_grid.Columns != Columns
+ || !msg_grid.chars)) {
// TODO(bfredl): eventually should be set to "invalid". I e all callers
// will use the grid including clear to EOS if necessary.
grid_alloc(&msg_grid, Rows, Columns, false, true);
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 8f415a8ed5..b9469686b5 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -404,7 +404,7 @@ int update_screen(int type)
default_grid.valid = true;
}
- if (type == NOT_VALID && msg_dothrottle()) {
+ if (type == NOT_VALID && (msg_dothrottle() || msg_grid.chars)) {
grid_fill(&default_grid, Rows-p_ch, Rows, 0, Columns, ' ', ' ', 0);
}
@@ -7288,9 +7288,9 @@ void screen_resize(int width, int height)
}
}
}
+ ui_flush();
}
- ui_flush();
- --busy;
+ busy--;
}
/// Check if the new Nvim application "shell" dimensions are valid.
diff --git a/src/nvim/testdir/shared.vim b/src/nvim/testdir/shared.vim
index bcd6d021a0..df512e2e3f 100644
--- a/src/nvim/testdir/shared.vim
+++ b/src/nvim/testdir/shared.vim
@@ -133,7 +133,7 @@ func s:kill_server(cmd)
endif
endfunc
-" Wait for up to a second for "expr" to become true. "expr" can be a
+" Wait for up to five seconds 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.
@@ -141,7 +141,7 @@ endfunc
" Return time slept in milliseconds. With the +reltime feature this can be
" more than the actual waiting time. Without +reltime it can also be less.
func WaitFor(expr, ...)
- let timeout = get(a:000, 0, 1000)
+ let timeout = get(a:000, 0, 5000)
" using reltime() is more accurate, but not always available
if has('reltime')
let start = reltime()
diff --git a/src/nvim/testdir/test_clientserver.vim b/src/nvim/testdir/test_clientserver.vim
index f03a6903c1..813cb338a5 100644
--- a/src/nvim/testdir/test_clientserver.vim
+++ b/src/nvim/testdir/test_clientserver.vim
@@ -32,7 +32,7 @@ func Test_client_server()
" Takes a short while for the server to be active.
" When using valgrind it takes much longer.
- call WaitFor('serverlist() =~ "' . name . '"', 5000)
+ call WaitFor('serverlist() =~ "' . name . '"')
call assert_match(name, serverlist())
call remote_foreground(name)
diff --git a/src/nvim/testdir/test_quotestar.vim b/src/nvim/testdir/test_quotestar.vim
index 3a8fdef3a3..b83fbe40e8 100644
--- a/src/nvim/testdir/test_quotestar.vim
+++ b/src/nvim/testdir/test_quotestar.vim
@@ -74,20 +74,20 @@ func Do_test_quotestar_for_x11()
" by the server.
let @* = 'no'
call remote_foreground(name)
- call WaitFor('remote_expr("' . name . '", "@*", "", 1) == "no"', 3000)
+ call WaitFor('remote_expr("' . name . '", "@*", "", 1) == "no"')
" Set the * register on the server.
call remote_send(name, ":let @* = 'yes'\<CR>")
- call WaitFor('remote_expr("' . name . '", "@*", "", 1) == "yes"', 3000)
+ call WaitFor('remote_expr("' . name . '", "@*", "", 1) == "yes"')
" Check that the *-register of this vim instance is changed as expected.
- call WaitFor('@* == "yes"', 3000)
+ call WaitFor('@* == "yes"')
" Handle the large selection over 262040 byte.
let length = 262044
let sample = 'a' . repeat('b', length - 2) . 'c'
let @* = sample
- call WaitFor('remote_expr("' . name . '", "len(@*) >= ' . length . '", "", 1)', 3000)
+ call WaitFor('remote_expr("' . name . '", "len(@*) >= ' . length . '", "", 1)')
let res = remote_expr(name, "@*", "", 2)
call assert_equal(length, len(res))
" Check length to prevent a large amount of output at assertion failure.
diff --git a/test/functional/ui/embed_spec.lua b/test/functional/ui/embed_spec.lua
index 5e09dc4289..f3cd223f53 100644
--- a/test/functional/ui/embed_spec.lua
+++ b/test/functional/ui/embed_spec.lua
@@ -81,6 +81,20 @@ local function test_embed(ext_linegrid)
eq(Screen.colors.Green, screen.default_colors.rgb_bg)
end}
end)
+
+ it("set display-=msgsep before first redraw", function()
+ startup('--cmd', 'set display-=msgsep')
+ screen:expect{grid=[[
+ ^ |
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ {3:~ }|
+ |
+ ]]}
+ end)
end
describe('--embed UI on startup (ext_linegrid=true)', function() test_embed(true) end)