diff src/normal.c @ 10813:09eb5fd275e0 v8.0.0296

patch 8.0.0296: bracketed paste can only append, not insert commit https://github.com/vim/vim/commit/fd8983b09c64d9bfa8a4bdc16d72c55fbb22b4dc Author: Bram Moolenaar <Bram@vim.org> Date: Thu Feb 2 22:21:29 2017 +0100 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.
author Christian Brabandt <cb@256bit.org>
date Thu, 02 Feb 2017 22:30:04 +0100
parents 9938c90d1e6c
children e366b968bf08
line wrap: on
line diff
--- a/src/normal.c
+++ b/src/normal.c
@@ -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 */