From fb4d5a184678ab231da20ef559c8e423dfa54d6e Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 27 May 2019 00:01:41 +0200 Subject: [PATCH] UI/ext_messages: restore kind=quickfix #10067 Accidentally removed in 34f9e72af9c9. ref #6201 --- src/nvim/quickfix.c | 1 + test/functional/ui/messages_spec.lua | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index 8036d3e3bc..9d4fb52dc3 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -2328,6 +2328,7 @@ static void qf_jump_print_msg(qf_info_T *qi, int qf_index, qfline_T *qf_ptr, } else if (!msg_scrolled && shortmess(SHM_OVERALL)) { msg_scroll = false; } + msg_ext_set_kind("quickfix"); msg_attr_keep(IObuff, 0, true, false); msg_scroll = (int)i; } diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua index 976dbe5893..50e354a7ee 100644 --- a/test/functional/ui/messages_spec.lua +++ b/test/functional/ui/messages_spec.lua @@ -27,7 +27,7 @@ describe('ui/ext_messages', function() os.remove('Xtest') end) - it('msg_show kind=confirm,confirm_sub,emsg,wmsg', function() + it('msg_show kind=confirm,confirm_sub,emsg,wmsg,quickfix', function() feed('iline 1\nline 2') -- kind=confirm @@ -143,6 +143,21 @@ describe('ui/ext_messages', function() kind = "return_prompt" } } } + + -- kind=quickfix after :cnext + feed('') + command("caddexpr [expand('%').':1:line1',expand('%').':2:line2']") + feed(':cnext') + screen:expect{grid=[[ + line 1 | + ^line 2 | + {1:~ }| + {1:~ }| + {1:~ }| + ]], messages={ { + content = { { "(2 of 2): line2" } }, + kind = "quickfix" + } }} end) it(':echoerr', function()