comparison src/screen.c @ 14004:e124262d435e v8.1.0020

patch 8.1.0020: cannot tell whether a register is executing or recording commit https://github.com/vim/vim/commit/0b6d911e5de1a1c10a23d4c2ee1b0275c474a2dd Author: Bram Moolenaar <Bram@vim.org> Date: Tue May 22 20:35:17 2018 +0200 patch 8.1.0020: cannot tell whether a register is executing or recording Problem: Cannot tell whether a register is being used for executing or recording. Solution: Add reg_executing() and reg_recording(). (Hirohito Higashi, closes #2745) Rename the global variables for consistency. Store the register name in reg_executing.
author Christian Brabandt <cb@256bit.org>
date Tue, 22 May 2018 20:45:05 +0200
parents d111462e0173
children b5e43a048878
comparison
equal deleted inserted replaced
14003:3965a5a6215e 14004:e124262d435e
10253 10253
10254 do_mode = ((p_smd && msg_silent == 0) 10254 do_mode = ((p_smd && msg_silent == 0)
10255 && ((State & INSERT) 10255 && ((State & INSERT)
10256 || restart_edit 10256 || restart_edit
10257 || VIsual_active)); 10257 || VIsual_active));
10258 if (do_mode || Recording) 10258 if (do_mode || reg_recording != 0)
10259 { 10259 {
10260 /* 10260 /*
10261 * Don't show mode right now, when not redrawing or inside a mapping. 10261 * Don't show mode right now, when not redrawing or inside a mapping.
10262 * Call char_avail() only when we are going to show something, because 10262 * Call char_avail() only when we are going to show something, because
10263 * it takes a bit of time. 10263 * it takes a bit of time.
10412 MSG_PUTS_ATTR(" --", attr); 10412 MSG_PUTS_ATTR(" --", attr);
10413 } 10413 }
10414 10414
10415 need_clear = TRUE; 10415 need_clear = TRUE;
10416 } 10416 }
10417 if (Recording 10417 if (reg_recording != 0
10418 #ifdef FEAT_INS_EXPAND 10418 #ifdef FEAT_INS_EXPAND
10419 && edit_submode == NULL /* otherwise it gets too long */ 10419 && edit_submode == NULL /* otherwise it gets too long */
10420 #endif 10420 #endif
10421 ) 10421 )
10422 { 10422 {
10487 { 10487 {
10488 int save_msg_row = msg_row; 10488 int save_msg_row = msg_row;
10489 int save_msg_col = msg_col; 10489 int save_msg_col = msg_col;
10490 10490
10491 msg_pos_mode(); 10491 msg_pos_mode();
10492 if (Recording) 10492 if (reg_recording != 0)
10493 recording_mode(HL_ATTR(HLF_CM)); 10493 recording_mode(HL_ATTR(HLF_CM));
10494 msg_clr_eos(); 10494 msg_clr_eos();
10495 10495
10496 msg_col = save_msg_col; 10496 msg_col = save_msg_col;
10497 msg_row = save_msg_row; 10497 msg_row = save_msg_row;
10502 { 10502 {
10503 MSG_PUTS_ATTR(_("recording"), attr); 10503 MSG_PUTS_ATTR(_("recording"), attr);
10504 if (!shortmess(SHM_RECORDING)) 10504 if (!shortmess(SHM_RECORDING))
10505 { 10505 {
10506 char_u s[4]; 10506 char_u s[4];
10507 sprintf((char *)s, " @%c", Recording); 10507 sprintf((char *)s, " @%c", reg_recording);
10508 MSG_PUTS_ATTR(s, attr); 10508 MSG_PUTS_ATTR(s, attr);
10509 } 10509 }
10510 } 10510 }
10511 10511
10512 /* 10512 /*