aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 855f63ba7b..a6eda26d75 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -41,6 +41,7 @@
#include "nvim/normal.h"
#include "nvim/option.h"
#include "nvim/path.h"
+#include "nvim/plines.h"
#include "nvim/screen.h"
#include "nvim/search.h"
#include "nvim/state.h"
@@ -954,7 +955,7 @@ static void set_yreg_additional_data(yankreg_T *reg, dict_T *additional_data)
/*
* Stuff string "p" into yank register "regname" as a single line (append if
- * uppercase). "p" must have been alloced.
+ * uppercase). "p" must have been allocated.
*
* return FAIL for failure, OK otherwise
*/
@@ -1066,7 +1067,7 @@ do_execreg(
if (reg->y_array == NULL)
return FAIL;
- // Disallow remaping for ":@r".
+ // Disallow remapping for ":@r".
int remap = colon ? REMAP_NONE : REMAP_YES;
/*
@@ -3069,7 +3070,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) {