diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-04-02 22:36:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-02 22:36:45 +0200 |
commit | 5134b22ac5dbc7a56b580e4cee48d1cf41eb7ab6 (patch) | |
tree | c50b5632d3d383091655f0763874ee323fae912e /src/nvim/ops.c | |
parent | 8eaa452073a1be59234642dba347316226f1dcb1 (diff) | |
parent | ed8b4987b7c75e340ed61e841a575409d4acd7c0 (diff) | |
download | rneovim-5134b22ac5dbc7a56b580e4cee48d1cf41eb7ab6.tar.gz rneovim-5134b22ac5dbc7a56b580e4cee48d1cf41eb7ab6.tar.bz2 rneovim-5134b22ac5dbc7a56b580e4cee48d1cf41eb7ab6.zip |
Merge #9831 from janlazo/vim-8.0.0681
vim-patch:8.0.0681,8.1.{118,119}
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 02ec3aad31..0ed96f0e57 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -1408,8 +1408,10 @@ 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]; - y_regs[1].y_array = NULL; /* set register "1 to empty */ + 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); } @@ -2789,8 +2791,8 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags) } if (!curbuf->terminal) { - // Autocommands may be executed when saving lines for undo, which may make - // y_array invalid. Start undo now to avoid that. + // Autocommands may be executed when saving lines for undo. This might + // make y_array invalid, so we start undo now to avoid that. if (u_save(curwin->w_cursor.lnum, curwin->w_cursor.lnum + 1) == FAIL) { return; } |