summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-11-19 17:56:13 +0100
committerBram Moolenaar <Bram@vim.org>2015-11-19 17:56:13 +0100
commita0ed84a26897c994512873a895b9fc54e90c6845 (patch)
tree0ca54e1951f994c1d373a225fa9a537e14045f5a /src
parent32d03b34ac8a34a962f57847fc431a2b4e14efea (diff)
downloadvim-git-a0ed84a26897c994512873a895b9fc54e90c6845.tar.gz
patch 7.4.925v7.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)
Diffstat (limited to 'src')
-rw-r--r--src/ops.c2
-rw-r--r--src/option.h3
-rw-r--r--src/screen.c18
-rw-r--r--src/version.c2
4 files changed, 21 insertions, 4 deletions
diff --git a/src/ops.c b/src/ops.c
index 62d88a786..d09958012 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -1080,7 +1080,7 @@ do_record(c)
retval = FAIL;
else
{
- Recording = TRUE;
+ Recording = c;
showmode();
regname = c;
retval = OK;
diff --git a/src/option.h b/src/option.h
index f87283687..c6a3e6041 100644
--- a/src/option.h
+++ b/src/option.h
@@ -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 */
diff --git a/src/screen.c b/src/screen.c
index de9e04df6..d80ad6f96 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -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.
diff --git a/src/version.c b/src/version.c
index e3742cc9e..5633841ed 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 925,
+/**/
924,
/**/
923,