]> granicus.if.org Git - vim/commitdiff
patch 8.0.0228: pasting in xterm on the command line has PasteStart v8.0.0228
authorBram Moolenaar <Bram@vim.org>
Tue, 24 Jan 2017 14:57:55 +0000 (15:57 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 24 Jan 2017 14:57:55 +0000 (15:57 +0100)
Problem:    When pasting test in an xterm on the command line it is surrounded
            by <PasteStart> and <PasteEnd>. (Johannes Kaltenbach)
Solution:   Add missing changes.

src/ex_getln.c
src/term.c
src/version.c

index 581c44492cb96a00b8b99494428a10aff5f7d9a0..7de7246b55a5a68124a49940f620ed1d005aa55e 100644 (file)
@@ -1794,6 +1794,10 @@ getcmdline(
                goto cmdline_not_changed;
 #endif
 
+       case K_PS:
+               bracketed_paste(PASTE_CMDLINE, FALSE, NULL);
+               goto cmdline_changed;
+
        default:
 #ifdef UNIX
                if (c == intr_char)
@@ -2366,8 +2370,7 @@ getexmodeline(
        if (ga_grow(&line_ga, 40) == FAIL)
            break;
 
-       /* Get one character at a time.  Don't use inchar(), it can't handle
-        * special characters. */
+       /* Get one character at a time. */
        prev_char = c1;
        c1 = vgetc();
 
@@ -2382,6 +2385,12 @@ getexmodeline(
            break;
        }
 
+       if (c1 == K_PS)
+       {
+           bracketed_paste(PASTE_EX, FALSE, &line_ga);
+           goto redraw;
+       }
+
        if (!escaped)
        {
            /* CR typed means "enter", which is NL */
index 8cb92dc478e30a2120e53dc28e1fee020ecebf21..f65a15be72c9d146199f305110b084e23c07ac41 100644 (file)
@@ -3148,7 +3148,7 @@ starttermcap(void)
     {
        out_str(T_TI);                  /* start termcap mode */
        out_str(T_KS);                  /* start "keypad transmit" mode */
-       out_str(T_BE);                  /* enable bracketed paste moe */
+       out_str(T_BE);                  /* enable bracketed paste mode */
        out_flush();
        termcap_active = TRUE;
        screen_start();                 /* don't know where cursor is now */
@@ -3198,7 +3198,7 @@ stoptermcap(void)
            check_for_codes_from_term();
        }
 #endif
-       out_str(T_BD);                  /* disable bracketed paste moe */
+       out_str(T_BD);                  /* disable bracketed paste mode */
        out_str(T_KE);                  /* stop "keypad transmit" mode */
        out_flush();
        termcap_active = FALSE;
index 84dde7353e9409a4c345e0f0ba397fa6d71e6d29..6d3b8483f77fc66308080e4fbdab686fb8880355 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    228,
 /**/
     227,
 /**/