diff options
author | Thomas Vigouroux <tomvig38@gmail.com> | 2020-09-16 22:57:34 +0200 |
---|---|---|
committer | Thomas Vigouroux <tomvig38@gmail.com> | 2021-07-06 19:07:11 +0200 |
commit | 55a2c513aafb386c01259fca711b2e0f9b85e359 (patch) | |
tree | e9775da5a45147c4706ad468af925e0a53bcdcb3 /src/nvim/ops.c | |
parent | df33f30e8882b2bf692253d63f73fb602a13f888 (diff) | |
download | rneovim-55a2c513aafb386c01259fca711b2e0f9b85e359.tar.gz rneovim-55a2c513aafb386c01259fca711b2e0f9b85e359.tar.bz2 rneovim-55a2c513aafb386c01259fca711b2e0f9b85e359.zip |
buffer: don't rely on curbuf in BUFEMPTY
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 855f63ba7b..545ab8a94a 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -3069,7 +3069,7 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags) } // In an empty buffer the empty line is going to be replaced, include // it in the saved lines. - if ((BUFEMPTY() ? u_save(0, 2) : u_save(lnum - 1, lnum)) == FAIL) { + if ((BUFEMPTY(curbuf) ? u_save(0, 2) : u_save(lnum - 1, lnum)) == FAIL) { goto end; } if (dir == FORWARD) { |