Skip to content

Commit b59118d

Browse files
committed
patch 8.0.1706: cannot sent CTRL-\ to a terminal window
Problem: Cannot sent CTRL-\ to a terminal window. Solution: Make CTRL-W CTRL-\ send CTRL-\ to a terminal window.
1 parent 5bab555 commit b59118d

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

runtime/doc/terminal.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ See |CTRL-W| for more commands.
7272

7373
Special in the terminal window: *CTRL-W_.* *CTRL-W_N*
7474
CTRL-W . send a CTRL-W to the job in the terminal
75+
CTRL-W CTRL-\ send a CTRL-\ to the job in the terminal
7576
CTRL-W N go to Terminal-Normal mode, see |Terminal-mode|
7677
CTRL-\ CTRL-N go to Terminal-Normal mode, see |Terminal-mode|
7778
CTRL-W " {reg} paste register {reg} *CTRL-W_quote*

src/terminal.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2056,6 +2056,11 @@ terminal_loop(int blocking)
20562056
/* "CTRL-W .": send CTRL-W to the job */
20572057
c = Ctrl_W;
20582058
}
2059+
else if (termkey == 0 && c == Ctrl_BSL)
2060+
{
2061+
/* "CTRL-W CTRL-\": send CTRL-\ to the job */
2062+
c = Ctrl_BSL;
2063+
}
20592064
else if (c == 'N')
20602065
{
20612066
/* CTRL-W N : go to Terminal-Normal mode. */
@@ -2173,7 +2178,7 @@ color2index(VTermColor *color, int fg, int *boldp)
21732178
case 2: return lookup_color( 4, fg, boldp) + 1; /* dark red */
21742179
case 3: return lookup_color( 2, fg, boldp) + 1; /* dark green */
21752180
case 4: return lookup_color( 6, fg, boldp) + 1; /* brown */
2176-
case 5: return lookup_color( 1, fg, boldp) + 1; /* dark blue*/
2181+
case 5: return lookup_color( 1, fg, boldp) + 1; /* dark blue */
21772182
case 6: return lookup_color( 5, fg, boldp) + 1; /* dark magenta */
21782183
case 7: return lookup_color( 3, fg, boldp) + 1; /* dark cyan */
21792184
case 8: return lookup_color( 8, fg, boldp) + 1; /* light grey */

src/version.c

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

763763
static int included_patches[] =
764764
{ /* Add new patch number below this line */
765+
/**/
766+
1706,
765767
/**/
766768
1705,
767769
/**/

0 commit comments

Comments
 (0)