diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-07-23 02:10:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-23 02:10:06 +0200 |
commit | 48c0e916a1224200eb95e08c2899b7b891dd53dc (patch) | |
tree | e4a6996204f58e9c83c6c41af228ac5616e652b7 /src/nvim/ops.c | |
parent | c9f2faf3bf3402690b6c9070e15a479df09a01da (diff) | |
parent | 031d21221eb430aba70ccee140082a4b39e7192d (diff) | |
download | rneovim-48c0e916a1224200eb95e08c2899b7b891dd53dc.tar.gz rneovim-48c0e916a1224200eb95e08c2899b7b891dd53dc.tar.bz2 rneovim-48c0e916a1224200eb95e08c2899b7b891dd53dc.zip |
Merge #8753 from janlazo/vim-8.0.0724
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index c95345f9b2..67171cb27e 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); } } } |