diff --git a/src/nvim/option.c b/src/nvim/option.c index 643ac24e43..5299d2a237 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -1282,10 +1282,10 @@ static void do_one_set_option(int opt_flags, char **argp, bool *did_show, char * if (*did_show) { msg_putchar('\n'); // cursor below last one } else { + msg_ext_set_kind("list_cmd"); gotocmdline(true); // cursor at status line *did_show = true; // remember that we did a line } - msg_ext_set_kind("list_cmd"); showoneopt(&options[opt_idx], opt_flags); if (p_verbose > 0) { diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua index 5b40457df9..fbd05cd9b8 100644 --- a/test/functional/ui/messages_spec.lua +++ b/test/functional/ui/messages_spec.lua @@ -1605,12 +1605,11 @@ stack traceback: it('g< mapping shows recent messages', function() command('echo "foo" | echo "bar"') - local s1 = [[ - ^ | - {1:~ }|*4 - ]] screen:expect({ - grid = s1, + grid = [[ + ^ | + {1:~ }|*4 + ]], messages = { { content = { { 'bar' } }, @@ -1644,6 +1643,23 @@ stack traceback: }, }) end) + + it('single event for multiple :set options', function() + command('set sw ts sts') + screen:expect({ + grid = [[ + ^ | + {1:~ }|*4 + ]], + messages = { + { + content = { { ' shiftwidth=8\n tabstop=8\n softtabstop=0' } }, + history = false, + kind = 'list_cmd', + }, + }, + }) + end) end) describe('ui/builtin messages', function()