diff options
author | Matthieu Coudron <mattator@gmail.com> | 2020-07-19 18:41:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-19 18:41:40 +0200 |
commit | daa5bffd93e19987980705990615c730fe07ea5f (patch) | |
tree | 38e422d674d51d0a4c0fb49a4fb2d0423ec9d6d7 /src/nvim/ops.c | |
parent | 8e350c1c6922f9c678e83d97227e7edd84967571 (diff) | |
parent | 140a372017c7649e156742622c9ccc1cd8b794c1 (diff) | |
download | rneovim-daa5bffd93e19987980705990615c730fe07ea5f.tar.gz rneovim-daa5bffd93e19987980705990615c730fe07ea5f.tar.bz2 rneovim-daa5bffd93e19987980705990615c730fe07ea5f.zip |
Merge pull request #12611 from janlazo/vim-8.0.1531
vim-patch:8.0.{1531,1544,1589,1591,1712,1745,1747},8.1.{819},8.2.{420,539,893,894,895,899,1114,1118,1169,1170,1171,1172,1173,1177,1179,1180,1181,1187,1188,1196,1198,1211,1214,1215,1222}
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 e905029dae..595a699563 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -3080,10 +3080,12 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags) if (ve_flags == VE_ALL && (curwin->w_cursor.coladd > 0 || endcol2 == curwin->w_cursor.col)) { - if (dir == FORWARD && c == NUL) - ++col; - if (dir != FORWARD && c != NUL) - ++curwin->w_cursor.col; + if (dir == FORWARD && c == NUL) { + col++; + } + if (dir != FORWARD && c != NUL && curwin->w_cursor.coladd > 0) { + curwin->w_cursor.col++; + } if (c == TAB) { if (dir == BACKWARD && curwin->w_cursor.col) curwin->w_cursor.col--; |