summaryrefslogtreecommitdiff
path: root/src/ops.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-07-16 17:56:16 +0200
committerBram Moolenaar <Bram@vim.org>2017-07-16 17:56:16 +0200
commite45deb79978677cb41f1477ba4140bccff658fd1 (patch)
tree61497b56b7a9fe1525645a3f1c1979753825a603 /src/ops.c
parent9b50bba643f8d1fcac91e11780da7d03d8995260 (diff)
downloadvim-git-e45deb79978677cb41f1477ba4140bccff658fd1.tar.gz
patch 8.0.0724: the message for yanking doesn't indicate the registerv8.0.0724
Problem: The message for yanking doesn't indicate the register. Solution: Show the register name in the "N lines yanked" message. (Lemonboy, closes #1803, closes #1809)
Diffstat (limited to 'src/ops.c')
-rw-r--r--src/ops.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/ops.c b/src/ops.c
index 2aec5d438..05ccc8114 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -3167,19 +3167,29 @@ op_yank(oparg_T *oap, int deleting, int mess)
/* Some versions of Vi use ">=" here, some don't... */
if (yanklines > p_report)
{
+ char namebuf[100];
+
+ if (oap->regname == NUL)
+ *namebuf = NUL;
+ else
+ vim_snprintf(namebuf, sizeof(namebuf),
+ " into \"%c", oap->regname);
+
/* redisplay now, so message is not deleted */
update_topline_redraw();
if (yanklines == 1)
{
if (oap->block_mode)
- MSG(_("block of 1 line yanked"));
+ smsg((char_u *)_("block of 1 line yanked%s"), namebuf);
else
- MSG(_("1 line yanked"));
+ smsg((char_u *)_("1 line yanked%s"), namebuf);
}
else if (oap->block_mode)
- smsg((char_u *)_("block of %ld lines yanked"), yanklines);
+ smsg((char_u *)_("block of %ld lines yanked%s"),
+ yanklines, namebuf);
else
- smsg((char_u *)_("%ld lines yanked"), yanklines);
+ smsg((char_u *)_("%ld lines yanked%s"), yanklines,
+ namebuf);
}
}