aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-11-11 12:26:35 +0100
committerGitHub <noreply@github.com>2024-11-11 12:26:35 +0100
commitd0e78b587195d201d643f3e131dd1ea951d906db (patch)
tree2a08bef2c02751daf28a33be8c57049554b57726 /src/nvim/ops.c
parent7919aa9102e1b9b7a9f7feaea6b134a98f5b60fc (diff)
parent4f9260d06a48216862ebb34fc33744486b058f58 (diff)
downloadrneovim-d0e78b587195d201d643f3e131dd1ea951d906db.tar.gz
rneovim-d0e78b587195d201d643f3e131dd1ea951d906db.tar.bz2
rneovim-d0e78b587195d201d643f3e131dd1ea951d906db.zip
Merge pull request #27813 from luukvbaal/msgid
feat(ext_messages): add hl_id to ext_messages chunks
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 1705c8b648..6bc2ce237b 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -257,7 +257,7 @@ void op_shift(oparg_T *oap, bool curs_top, int amount)
vim_snprintf(IObuff, IOSIZE,
NGETTEXT(msg_line_single, msg_line_plural, oap->line_count),
(int64_t)oap->line_count, op, amount);
- msg_attr_keep(IObuff, 0, true, false);
+ msg_hl_keep(IObuff, 0, true, false);
}
if ((cmdmod.cmod_flags & CMOD_LOCKMARKS) == 0) {
@@ -3653,7 +3653,7 @@ void ex_display(exarg_T *eap)
if (arg != NULL && *arg == NUL) {
arg = NULL;
}
- int attr = HL_ATTR(HLF_8);
+ int hl_id = HLF_8 + 1;
// Highlight title
msg_puts_title(_("\nType Name Content"));
@@ -3709,18 +3709,18 @@ void ex_display(exarg_T *eap)
int n = Columns - 11;
for (size_t j = 0; j < yb->y_size && n > 1; j++) {
if (j) {
- msg_puts_attr("^J", attr);
+ msg_puts_hl("^J", hl_id, false);
n -= 2;
}
for (p = yb->y_array[j].data;
*p != NUL && (n -= ptr2cells(p)) >= 0; p++) {
int clen = utfc_ptr2len(p);
- msg_outtrans_len(p, clen, 0);
+ msg_outtrans_len(p, clen, 0, false);
p += clen - 1;
}
}
if (n > 1 && yb->y_type == kMTLineWise) {
- msg_puts_attr("^J", attr);
+ msg_puts_hl("^J", hl_id, false);
}
}
os_breakcheck();
@@ -3790,10 +3790,10 @@ static void dis_msg(const char *p, bool skip_esc)
&& (n -= ptr2cells(p)) >= 0) {
int l;
if ((l = utfc_ptr2len(p)) > 1) {
- msg_outtrans_len(p, l, 0);
+ msg_outtrans_len(p, l, 0, false);
p += l;
} else {
- msg_outtrans_len(p++, 1, 0);
+ msg_outtrans_len(p++, 1, 0, false);
}
}
os_breakcheck();