diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-04-01 21:18:42 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-04-01 21:29:59 -0400 |
commit | 8843928e10512b5ce17a99d896a16f03c12aeba1 (patch) | |
tree | 87caae4fd14bbb23c52fac8c022ff95d9f802a15 /src/nvim/ops.c | |
parent | 35362495c965554f45634bcde3c4ce6d5eca52aa (diff) | |
download | rneovim-8843928e10512b5ce17a99d896a16f03c12aeba1.tar.gz rneovim-8843928e10512b5ce17a99d896a16f03c12aeba1.tar.bz2 rneovim-8843928e10512b5ce17a99d896a16f03c12aeba1.zip |
vim-patch:8.0.0681: unnamed register only contains the last deleted text
Problem: Unnamed register only contains the last deleted text when
appending deleted text to a register. (Wolfgang Jeltsch)
Solution: Only set y_previous when not using y_append. (Christian Brabandt)
https://github.com/vim/vim/commit/18d90b95c49d9ff1c635dd762864022aab8e71f1
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 02ec3aad31..f4db97670e 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -1408,7 +1408,9 @@ int op_delete(oparg_T *oap) free_register(&y_regs[9]); /* free register "9 */ for (n = 9; n > 1; n--) y_regs[n] = y_regs[n - 1]; - y_previous = &y_regs[1]; + if (!is_append_register(oap->regname)) { + y_previous = &y_regs[1]; + } y_regs[1].y_array = NULL; /* set register "1 to empty */ reg = &y_regs[1]; op_yank_reg(oap, false, reg, false); |