aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorwatiko <service@mail.watiko.net>2016-02-15 22:40:55 +0900
committerwatiko <service@mail.watiko.net>2016-02-17 21:04:20 +0900
commit46128219462b44d4a5ae964b41812f6953753fed (patch)
tree4f621a3d8c28ebcc5c513c6e8ef9b6c061658f03 /src/nvim/ops.c
parent498eb020498010c157e453daa8a1f3a518a82ff3 (diff)
downloadrneovim-46128219462b44d4a5ae964b41812f6953753fed.tar.gz
rneovim-46128219462b44d4a5ae964b41812f6953753fed.tar.bz2
rneovim-46128219462b44d4a5ae964b41812f6953753fed.zip
vim-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 vim/vim#470) https://github.com/vim/vim/commit/a0ed84a26897c994512873a895b9fc54e90c6845
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index b1adc85e1d..0efce8c4c0 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -835,12 +835,13 @@ int do_record(int c)
yankreg_T *old_y_previous;
int retval;
- if (Recording == FALSE) { /* start recording */
- /* registers 0-9, a-z and " are allowed */
- if (c < 0 || (!ASCII_ISALNUM(c) && c != '"'))
+ if (Recording == false) {
+ // start recording
+ // registers 0-9, a-z and " are allowed
+ if (c < 0 || (!ASCII_ISALNUM(c) && c != '"')) {
retval = FAIL;
- else {
- Recording = TRUE;
+ } else {
+ Recording = c;
showmode();
regname = c;
retval = OK;