diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2024-02-20 17:25:57 +0100 |
---|---|---|
committer | Luuk van Baal <luukvbaal@gmail.com> | 2024-11-08 13:21:35 +0100 |
commit | 5cfa7a72f8c40cdcc0fa93693689915e913806f1 (patch) | |
tree | 2c482565d5667dc0ec9caca6e893da7d5a37359a /src/nvim/change.c | |
parent | 5a86360400691e55fae66d60485b61360a1d3d6c (diff) | |
download | rneovim-5cfa7a72f8c40cdcc0fa93693689915e913806f1.tar.gz rneovim-5cfa7a72f8c40cdcc0fa93693689915e913806f1.tar.bz2 rneovim-5cfa7a72f8c40cdcc0fa93693689915e913806f1.zip |
refactor(message): propagate highlight id instead of attrs
Problem: Highlight group id is not propagated to the end of the message call
stack, where ext_messages are emitted.
Solution: Refactor message functions to pass along highlight group id
instead of attr id.
Diffstat (limited to 'src/nvim/change.c')
-rw-r--r-- | src/nvim/change.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/change.c b/src/nvim/change.c index 51a13b80e7..3d78b17f2a 100644 --- a/src/nvim/change.c +++ b/src/nvim/change.c @@ -89,9 +89,9 @@ void change_warning(buf_T *buf, int col) if (msg_row == Rows - 1) { msg_col = col; } - msg_source(HL_ATTR(HLF_W)); + msg_source(HLF_W + 1); msg_ext_set_kind("wmsg"); - msg_puts_attr(_(w_readonly), HL_ATTR(HLF_W) | MSG_HIST); + msg_puts_hl(_(w_readonly), HLF_W + 1, true); set_vim_var_string(VV_WARNINGMSG, _(w_readonly), -1); msg_clr_eos(); msg_end(); |