diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-07-09 10:15:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-09 10:15:18 +0200 |
commit | 1c416892879de6b78038f2cc2f1487eff46abb60 (patch) | |
tree | 3895521bc907b7a0617940c21272ac7ee9f052da /src/nvim/ops.c | |
parent | 27118c6eb3351b0df96e2514e8f3806108e50cf7 (diff) | |
parent | 9c93e6461c8c6ec2e8d3e73f506389ac7086d531 (diff) | |
download | rneovim-1c416892879de6b78038f2cc2f1487eff46abb60.tar.gz rneovim-1c416892879de6b78038f2cc2f1487eff46abb60.tar.bz2 rneovim-1c416892879de6b78038f2cc2f1487eff46abb60.zip |
Merge pull request #12971 from vigoux/decurbuf
Decrease reliance on curbuf in BUFEMPTY and `undo.c`
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 4921054bfc..c51dd09d40 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -3069,7 +3069,8 @@ 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 ((buf_is_empty(curbuf) ? + u_save(0, 2) : u_save(lnum - 1, lnum)) == FAIL) { goto end; } if (dir == FORWARD) { |