diff options
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r-- | src/nvim/screen.c | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 2cbd45e922..07cd8549a6 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -65,8 +65,8 @@ #include <stdbool.h> #include <string.h> -#include "nvim/api/private/helpers.h" #include "nvim/api/extmark.h" +#include "nvim/api/private/helpers.h" #include "nvim/api/vim.h" #include "nvim/arabic.h" #include "nvim/ascii.h" @@ -1952,7 +1952,7 @@ static size_t fill_foldcolumn(char_u *p, win_T *wp, foldinfo_T foldinfo, linenr_ first_level = 1; } - for (i = 0; i < MIN(fdc, level); i++) { + for (i = 0; i < MIN(fdc, level); i++) { if (foldinfo.fi_lnum == lnum && first_level + i >= foldinfo.fi_low_level) { symbol = wp->w_p_fcs_chars.foldopen; @@ -6083,7 +6083,7 @@ static void prepare_search_hl(win_T *wp, linenr_T lnum) || (cur != NULL && pos_inprogress))) { next_search_hl(wp, shl, shl->first_lnum, (colnr_T)n, shl == &search_hl ? NULL : cur); - pos_inprogress = !(cur == NULL || cur->pos.cur == 0); + pos_inprogress = !(cur == NULL || cur->pos.cur == 0); if (shl->lnum != 0) { shl->first_lnum = shl->lnum + shl->rm.endpos[0].lnum @@ -6727,7 +6727,6 @@ bool grid_invalid_row(ScreenGrid *grid, int row) } - /// Copy part of a grid line for vertically split window. static void linecopy(ScreenGrid *grid, int to, int from, int col, int width) { @@ -6964,7 +6963,7 @@ int showmode(void) lines_left = 0; if (do_mode) { - MSG_PUTS_ATTR("--", attr); + msg_puts_attr("--", attr); // CTRL-X in Insert mode if (edit_submode != NULL && !shortmess(SHM_COMPLETIONMENU)) { // These messages can get long, avoid a wrap in a narrow window. @@ -6989,7 +6988,7 @@ int showmode(void) msg_puts_attr((const char *)edit_submode, attr); } if (edit_submode_extra != NULL) { - MSG_PUTS_ATTR(" ", attr); // Add a space in between. + msg_puts_attr(" ", attr); // Add a space in between. if ((int)edit_submode_highl < HLF_COUNT) { sub_attr = win_hl_attr(curwin, edit_submode_highl); } else { @@ -7000,37 +6999,37 @@ int showmode(void) } } else { if (State & TERM_FOCUS) { - MSG_PUTS_ATTR(_(" TERMINAL"), attr); + msg_puts_attr(_(" TERMINAL"), attr); } else if (State & VREPLACE_FLAG) { - MSG_PUTS_ATTR(_(" VREPLACE"), attr); + msg_puts_attr(_(" VREPLACE"), attr); } else if (State & REPLACE_FLAG) { - MSG_PUTS_ATTR(_(" REPLACE"), attr); + msg_puts_attr(_(" REPLACE"), attr); } else if (State & INSERT) { if (p_ri) { - MSG_PUTS_ATTR(_(" REVERSE"), attr); + msg_puts_attr(_(" REVERSE"), attr); } - MSG_PUTS_ATTR(_(" INSERT"), attr); + msg_puts_attr(_(" INSERT"), attr); } else if (restart_edit == 'I' || restart_edit == 'i' || restart_edit == 'a') { - MSG_PUTS_ATTR(_(" (insert)"), attr); + msg_puts_attr(_(" (insert)"), attr); } else if (restart_edit == 'R') { - MSG_PUTS_ATTR(_(" (replace)"), attr); + msg_puts_attr(_(" (replace)"), attr); } else if (restart_edit == 'V') { - MSG_PUTS_ATTR(_(" (vreplace)"), attr); + msg_puts_attr(_(" (vreplace)"), attr); } if (p_hkmap) { - MSG_PUTS_ATTR(_(" Hebrew"), attr); + msg_puts_attr(_(" Hebrew"), attr); } if (State & LANGMAP) { if (curwin->w_p_arab) { - MSG_PUTS_ATTR(_(" Arabic"), attr); + msg_puts_attr(_(" Arabic"), attr); } else if (get_keymap_str(curwin, (char_u *)" (%s)", NameBuff, MAXPATHL)) { - MSG_PUTS_ATTR(NameBuff, attr); + msg_puts_attr((char *)NameBuff, attr); } } if ((State & INSERT) && p_paste) { - MSG_PUTS_ATTR(_(" (paste)"), attr); + msg_puts_attr(_(" (paste)"), attr); } if (VIsual_active) { @@ -7054,9 +7053,9 @@ int showmode(void) default: p = N_(" SELECT BLOCK"); break; } - MSG_PUTS_ATTR(_(p), attr); + msg_puts_attr(_(p), attr); } - MSG_PUTS_ATTR(" --", attr); + msg_puts_attr(" --", attr); } need_clear = TRUE; @@ -7145,11 +7144,11 @@ void clearmode(void) static void recording_mode(int attr) { - MSG_PUTS_ATTR(_("recording"), attr); + msg_puts_attr(_("recording"), attr); if (!shortmess(SHM_RECORDING)) { - char_u s[4]; - snprintf((char *)s, ARRAY_SIZE(s), " @%c", reg_recording); - MSG_PUTS_ATTR(s, attr); + char s[4]; + snprintf(s, ARRAY_SIZE(s), " @%c", reg_recording); + msg_puts_attr(s, attr); } } |