aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorluukvbaal <luukvbaal@gmail.com>2025-02-21 01:40:21 +0100
committerGitHub <noreply@github.com>2025-02-20 16:40:21 -0800
commit08f7c2237767e75e2398c057aed0f10740c487b0 (patch)
tree3bd4f108f0f58345ade206c371fe7f498cbc9834 /src/nvim/ops.c
parentf4cd5a33b6b06fe77652e19eba46af107de36a2b (diff)
downloadrneovim-08f7c2237767e75e2398c057aed0f10740c487b0.tar.gz
rneovim-08f7c2237767e75e2398c057aed0f10740c487b0.tar.bz2
rneovim-08f7c2237767e75e2398c057aed0f10740c487b0.zip
fix(messages): list_cmd kind for :registers, :au[g] #32531
Problem: No kind for `:registers/autocmd/augroup` messages. `:registers` chunks are emitted as separate `msg_show` events. Solution: Add the `list_cmd` kind to the message. Introduce a new `msg_ext_skip_flush` variable to set to true around a group of to be paired message chunks.
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 2491621fbc..6c437bcb2c 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -3770,10 +3770,16 @@ void ex_display(exarg_T *eap)
}
int hl_id = HLF_8;
+ msg_ext_set_kind("list_cmd");
+ msg_ext_skip_flush = true;
// Highlight title
msg_puts_title(_("\nType Name Content"));
for (int i = -1; i < NUM_REGISTERS && !got_int; i++) {
int name = get_register_name(i);
+ if (arg != NULL && vim_strchr(arg, name) == NULL) {
+ continue; // did not ask for this register
+ }
+
switch (get_reg_type(name, NULL)) {
case kMTLineWise:
type = 'l'; break;
@@ -3783,10 +3789,6 @@ void ex_display(exarg_T *eap)
type = 'b'; break;
}
- if (arg != NULL && vim_strchr(arg, name) == NULL) {
- continue; // did not ask for this register
- }
-
if (i == -1) {
if (y_previous != NULL) {
yb = y_previous;
@@ -3890,6 +3892,7 @@ void ex_display(exarg_T *eap)
msg_puts("\n c \"= ");
dis_msg(expr_line, false);
}
+ msg_ext_skip_flush = false;
}
/// display a string for do_dis()