0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.0.0296: bracketed paste can only append, not insert

Problem:    Bracketed paste can only append, not insert.
Solution:   When the cursor is in the first column insert the text.
This commit is contained in:
Bram Moolenaar
2017-02-02 22:21:29 +01:00
parent 7a073549a3
commit fd8983b09c
4 changed files with 37 additions and 7 deletions

View File

@@ -9079,8 +9079,13 @@ nv_edit(cmdarg_T *cap)
beginline(BL_WHITE|BL_FIX);
break;
case K_PS: /* Bracketed paste works like "a"ppend, unless the
cursor is in the first column, then it inserts. */
if (curwin->w_cursor.col == 0)
break;
/*FALLTHROUGH*/
case 'a': /* "a"ppend is like "i"nsert on the next character. */
case K_PS: /* bracketed paste works like "a"ppend */
#ifdef FEAT_VIRTUALEDIT
/* increment coladd when in virtual space, increment the
* column otherwise, also to append after an unprintable char */