aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/screen.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-05-27 12:01:35 +0200
committerGitHub <noreply@github.com>2019-05-27 12:01:35 +0200
commit69b3d5acd375e36a06474c6ebd2622cb0c2fcca5 (patch)
treef34ba1b9e0e138f86666e77280da66f6ca0687e3 /src/nvim/screen.c
parentfb4d5a184678ab231da20ef559c8e423dfa54d6e (diff)
parent3c3b7844b95879bcfd86677df4cfac3edb0fb132 (diff)
downloadrneovim-69b3d5acd375e36a06474c6ebd2622cb0c2fcca5.tar.gz
rneovim-69b3d5acd375e36a06474c6ebd2622cb0c2fcca5.tar.bz2
rneovim-69b3d5acd375e36a06474c6ebd2622cb0c2fcca5.zip
Merge #10068 from janlazo/vim-8.1.0020
vim-patch:8.1.{20,995,1077}
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r--src/nvim/screen.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index b0109b0824..fe9fba7af6 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -6410,14 +6410,11 @@ int showmode(void)
&& ((State & TERM_FOCUS)
|| (State & INSERT)
|| restart_edit
- || VIsual_active
- ));
- if (do_mode || Recording) {
- /*
- * Don't show mode right now, when not redrawing or inside a mapping.
- * Call char_avail() only when we are going to show something, because
- * it takes a bit of time.
- */
+ || VIsual_active));
+ if (do_mode || reg_recording != 0) {
+ // Don't show mode right now, when not redrawing or inside a mapping.
+ // Call char_avail() only when we are going to show something, because
+ // it takes a bit of time.
if (!redrawing() || (char_avail() && !KeyTyped) || msg_silent != 0) {
redraw_cmdline = TRUE; /* show mode later */
return 0;
@@ -6533,8 +6530,8 @@ int showmode(void)
need_clear = TRUE;
}
- if (Recording
- && edit_submode == NULL /* otherwise it gets too long */
+ if (reg_recording != 0
+ && edit_submode == NULL // otherwise it gets too long
) {
recording_mode(attr);
need_clear = true;
@@ -6600,7 +6597,7 @@ void clearmode(void)
{
msg_ext_ui_flush();
msg_pos_mode();
- if (Recording) {
+ if (reg_recording != 0) {
recording_mode(HL_ATTR(HLF_CM));
}
msg_clr_eos();
@@ -6612,7 +6609,7 @@ static void recording_mode(int attr)
MSG_PUTS_ATTR(_("recording"), attr);
if (!shortmess(SHM_RECORDING)) {
char_u s[4];
- vim_snprintf((char *)s, ARRAY_SIZE(s), " @%c", Recording);
+ snprintf((char *)s, ARRAY_SIZE(s), " @%c", reg_recording);
MSG_PUTS_ATTR(s, attr);
}
}