diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-11-11 13:06:37 +0100 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2024-11-13 11:20:10 +0100 |
commit | ff7518b83cb270f8fcaded19bf640cf4bdfb0ff0 (patch) | |
tree | 366be69fff5a72c1f73b27ffa8cdf1a900288dbf /src/nvim/drawscreen.c | |
parent | eaf5ae6cc69a97e58365b409554783be9dd21385 (diff) | |
download | rneovim-ff7518b83cb270f8fcaded19bf640cf4bdfb0ff0.tar.gz rneovim-ff7518b83cb270f8fcaded19bf640cf4bdfb0ff0.tar.bz2 rneovim-ff7518b83cb270f8fcaded19bf640cf4bdfb0ff0.zip |
refactor(highlight): make enum of builtin highlights start with 1
This makes it possible to use HLF_ values directly as highlight id:s
and avoids +1 adjustments especially around messages.
Diffstat (limited to 'src/nvim/drawscreen.c')
-rw-r--r-- | src/nvim/drawscreen.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c index b5e2f4461b..e90a0d945f 100644 --- a/src/nvim/drawscreen.c +++ b/src/nvim/drawscreen.c @@ -952,7 +952,7 @@ int showmode(void) // Position on the last line in the window, column 0 msg_pos_mode(); - int hl_id = HLF_CM + 1; // Highlight mode + int hl_id = HLF_CM; // Highlight mode // When the screen is too narrow to show the entire mode message, // avoid scrolling and truncate instead. @@ -987,7 +987,7 @@ int showmode(void) } if (edit_submode_extra != NULL) { msg_puts_hl(" ", hl_id, false); // Add a space in between. - int sub_id = edit_submode_highl < HLF_COUNT ? (int)edit_submode_highl + 1 : hl_id; + int sub_id = edit_submode_highl < HLF_COUNT ? (int)edit_submode_highl : hl_id; msg_puts_hl(edit_submode_extra, sub_id, false); } } @@ -1133,7 +1133,7 @@ void clearmode(void) msg_ext_ui_flush(); msg_pos_mode(); if (reg_recording != 0) { - recording_mode(HLF_CM + 1); + recording_mode(HLF_CM); } msg_clr_eos(); msg_ext_flush_showmode(); |