Skip to content

Commit abbc448

Browse files
committed
patch 8.0.0228: pasting in xterm on the command line has PasteStart
Problem: When pasting test in an xterm on the command line it is surrounded by <PasteStart> and <PasteEnd>. (Johannes Kaltenbach) Solution: Add missing changes.
1 parent 2aa5f69 commit abbc448

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

src/ex_getln.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1794,6 +1794,10 @@ getcmdline(
17941794
goto cmdline_not_changed;
17951795
#endif
17961796

1797+
case K_PS:
1798+
bracketed_paste(PASTE_CMDLINE, FALSE, NULL);
1799+
goto cmdline_changed;
1800+
17971801
default:
17981802
#ifdef UNIX
17991803
if (c == intr_char)
@@ -2366,8 +2370,7 @@ getexmodeline(
23662370
if (ga_grow(&line_ga, 40) == FAIL)
23672371
break;
23682372

2369-
/* Get one character at a time. Don't use inchar(), it can't handle
2370-
* special characters. */
2373+
/* Get one character at a time. */
23712374
prev_char = c1;
23722375
c1 = vgetc();
23732376

@@ -2382,6 +2385,12 @@ getexmodeline(
23822385
break;
23832386
}
23842387

2388+
if (c1 == K_PS)
2389+
{
2390+
bracketed_paste(PASTE_EX, FALSE, &line_ga);
2391+
goto redraw;
2392+
}
2393+
23852394
if (!escaped)
23862395
{
23872396
/* CR typed means "enter", which is NL */

src/term.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3148,7 +3148,7 @@ starttermcap(void)
31483148
{
31493149
out_str(T_TI); /* start termcap mode */
31503150
out_str(T_KS); /* start "keypad transmit" mode */
3151-
out_str(T_BE); /* enable bracketed paste moe */
3151+
out_str(T_BE); /* enable bracketed paste mode */
31523152
out_flush();
31533153
termcap_active = TRUE;
31543154
screen_start(); /* don't know where cursor is now */
@@ -3198,7 +3198,7 @@ stoptermcap(void)
31983198
check_for_codes_from_term();
31993199
}
32003200
#endif
3201-
out_str(T_BD); /* disable bracketed paste moe */
3201+
out_str(T_BD); /* disable bracketed paste mode */
32023202
out_str(T_KE); /* stop "keypad transmit" mode */
32033203
out_flush();
32043204
termcap_active = FALSE;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
228,
767769
/**/
768770
227,
769771
/**/

0 commit comments

Comments
 (0)