aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-07-17 08:37:41 -0400
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-07-17 09:01:18 -0400
commiteab17e5093687760e67d26696b8cecccb20b364a (patch)
tree43fee00322103d060c363c81bbae8be28b9e5eb4 /src/nvim/ops.c
parentcd6e7e8cf302f7d2397c89a65a483f9cd543f9dd (diff)
downloadrneovim-eab17e5093687760e67d26696b8cecccb20b364a.tar.gz
rneovim-eab17e5093687760e67d26696b8cecccb20b364a.tar.bz2
rneovim-eab17e5093687760e67d26696b8cecccb20b364a.zip
vim-patch:8.0.0724: the message for yanking doesn't indicate the register
Problem: The message for yanking doesn't indicate the register. Solution: Show the register name in the "N lines yanked" message. (Lemonboy, closes vim/vim#1803, closes vim/vim#1809) https://github.com/vim/vim/commit/e45deb79978677cb41f1477ba4140bccff658fd1
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index c95345f9b2..b30be0bada 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -2509,19 +2509,27 @@ static void op_yank_reg(oparg_T *oap, bool message, yankreg_T *reg, bool append)
}
// Some versions of Vi use ">=" here, some don't...
if (yanklines > (size_t)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 (yank_type == kMTBlockWise) {
- MSG(_("block of 1 line yanked"));
+ smsg(_("block of 1 line yanked%s"), namebuf);
} else {
- MSG(_("1 line yanked"));
+ smsg(_("1 line yanked%s"), namebuf);
}
} else if (yank_type == kMTBlockWise) {
- smsg(_("block of %" PRId64 " lines yanked"),
- (int64_t)yanklines);
+ smsg(_("block of %" PRId64 " lines yanked%s"),
+ (int64_t)yanklines, namebuf);
} else {
- smsg(_("%" PRId64 " lines yanked"), (int64_t)yanklines);
+ smsg(_("%" PRId64 " lines yanked%s"), (int64_t)yanklines, namebuf);
}
}
}