0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

patch 7.4.925

Problem:    User may yank or put using the register being recorded in.
Solution:   Add the recording register in the message. (Christian Brabandt,
            closes #470)
This commit is contained in:
Bram Moolenaar
2015-11-19 17:56:13 +01:00
parent 32d03b34ac
commit a0ed84a268
6 changed files with 29 additions and 5 deletions

View File

@@ -1080,7 +1080,7 @@ do_record(c)
retval = FAIL;
else
{
Recording = TRUE;
Recording = c;
showmode();
regname = c;
retval = OK;

View File

@@ -213,7 +213,8 @@
#define SHM_ATTENTION 'A' /* no ATTENTION messages */
#define SHM_INTRO 'I' /* intro messages */
#define SHM_COMPLETIONMENU 'c' /* completion menu messages */
#define SHM_ALL "rmfixlnwaWtToOsAIc" /* all possible flags for 'shm' */
#define SHM_RECORDING 'q' /* short recording message */
#define SHM_ALL "rmfixlnwaWtToOsAIcq" /* all possible flags for 'shm' */
/* characters for p_go: */
#define GO_ASEL 'a' /* autoselect */

View File

@@ -163,6 +163,7 @@ static void redraw_block __ARGS((int row, int end, win_T *wp));
static int win_do_lines __ARGS((win_T *wp, int row, int line_count, int mayclear, int del));
static void win_rest_invalid __ARGS((win_T *wp));
static void msg_pos_mode __ARGS((void));
static void recording_mode __ARGS((int attr));
#if defined(FEAT_WINDOWS)
static void draw_tabline __ARGS((void));
#endif
@@ -10163,7 +10164,7 @@ showmode()
#endif
)
{
MSG_PUTS_ATTR(_("recording"), attr);
recording_mode(attr);
need_clear = TRUE;
}
@@ -10227,11 +10228,24 @@ unshowmode(force)
{
msg_pos_mode();
if (Recording)
MSG_PUTS_ATTR(_("recording"), hl_attr(HLF_CM));
recording_mode(hl_attr(HLF_CM));
msg_clr_eos();
}
}
static void
recording_mode(attr)
int attr;
{
MSG_PUTS_ATTR(_("recording"), attr);
if (!shortmess(SHM_RECORDING))
{
char_u s[4];
sprintf((char *)s, " @%c", Recording);
MSG_PUTS_ATTR(s, attr);
}
}
#if defined(FEAT_WINDOWS)
/*
* Draw the tab pages line at the top of the Vim window.

View File

@@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
925,
/**/
924,
/**/