diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-04-30 12:24:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-30 12:24:56 +0200 |
commit | 8342b4486b43e6664b6412ac0c8a549097220df2 (patch) | |
tree | 7b892b17acbcac5e8298b641e336ee7de05647dd /src/nvim/ops.c | |
parent | 63526f2eeee774c657270a1ec0cbd788480f14b7 (diff) | |
parent | 0e7048ae0558e457d37ce2d13dc5f1f9e62deb49 (diff) | |
download | rneovim-8342b4486b43e6664b6412ac0c8a549097220df2.tar.gz rneovim-8342b4486b43e6664b6412ac0c8a549097220df2.tar.bz2 rneovim-8342b4486b43e6664b6412ac0c8a549097220df2.zip |
Merge #9957 from janlazo/vim-8.0.1263
vim-patch:8.0.{1263,1265,1267}
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index bd436bfac6..216bab4dda 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -3001,9 +3001,10 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags) /* add a new line */ if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count) { if (ml_append(curbuf->b_ml.ml_line_count, (char_u *)"", - (colnr_T)1, FALSE) == FAIL) + (colnr_T)1, false) == FAIL) { break; - ++nr_lines; + } + nr_lines++; } /* get the old line and advance to the position to insert at */ oldp = get_cursor_line_ptr(); @@ -3190,8 +3191,8 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags) newp = (char_u *) xmalloc((size_t)(STRLEN(ptr) + totlen + 1)); STRCPY(newp, y_array[y_size - 1]); STRCAT(newp, ptr); - /* insert second line */ - ml_append(lnum, newp, (colnr_T)0, FALSE); + // insert second line + ml_append(lnum, newp, (colnr_T)0, false); xfree(newp); oldp = ml_get(lnum); |