Skip to content

Commit c5520ee

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents e5e5f79 + c6da01a commit c5520ee

4 files changed

Lines changed: 24 additions & 9 deletions

File tree

src/option.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4146,8 +4146,8 @@ set_init_2(void)
41464146
* This is just guessing! Recognized are:
41474147
* "linux" Linux console
41484148
* "screen.linux" Linux console with screen
4149-
* "cygwin" Cygwin shell
4150-
* "putty" Putty program
4149+
* "cygwin.*" Cygwin shell
4150+
* "putty.*" Putty program
41514151
* We also check the COLORFGBG environment variable, which is set by
41524152
* rxvt and derivatives. This variable contains either two or three
41534153
* values separated by semicolons; we want the last value in either
@@ -4157,15 +4157,15 @@ set_init_2(void)
41574157
term_bg_default(void)
41584158
{
41594159
#if defined(WIN3264)
4160-
/* DOS console nearly always black */
4160+
/* DOS console is nearly always black */
41614161
return (char_u *)"dark";
41624162
#else
41634163
char_u *p;
41644164

41654165
if (STRCMP(T_NAME, "linux") == 0
41664166
|| STRCMP(T_NAME, "screen.linux") == 0
4167-
|| STRCMP(T_NAME, "cygwin") == 0
4168-
|| STRCMP(T_NAME, "putty") == 0
4167+
|| STRNCMP(T_NAME, "cygwin", 6) == 0
4168+
|| STRNCMP(T_NAME, "putty", 5) == 0
41694169
|| ((p = mch_getenv((char_u *)"COLORFGBG")) != NULL
41704170
&& (p = vim_strrchr(p, ';')) != NULL
41714171
&& ((p[1] >= '0' && p[1] <= '6') || p[1] == '8')

src/term.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4589,7 +4589,7 @@ check_termcode(
45894589
/* PuTTY sends 0;136;0
45904590
* vandyke SecureCRT sends 1;136;0 */
45914591
if (version == 136
4592-
&& STRNCMP(tp + extra - 3, ";136;0c", 8) == 0)
4592+
&& STRNCMP(tp + extra - 1, ";136;0c", 7) == 0)
45934593
is_not_xterm = TRUE;
45944594

45954595
/* Konsole sends 0;115;0 */
@@ -4747,9 +4747,10 @@ check_termcode(
47474747
key_name[0] = (int)KS_EXTRA;
47484748
key_name[1] = (int)KE_IGNORE;
47494749
slen = i + 1 + (tp[i] == ESC);
4750-
if (tp[i] == 0x07 && i + 1 < len && tp[i + 1] == 0x18)
4751-
/* Sometimes the 0x07 is followed by 0x18, unclear
4752-
* when this happens. */
4750+
if (rcs_status == STATUS_SENT
4751+
&& slen < len && tp[slen] == 0x18)
4752+
/* Some older xterm send 0x18 for the T_RS request,
4753+
* skip it here. */
47534754
++slen;
47544755
# ifdef FEAT_EVAL
47554756
set_vim_var_string(VV_TERMRGBRESP, tp, slen);
@@ -4799,6 +4800,11 @@ check_termcode(
47994800
key_name[0] = (int)KS_EXTRA;
48004801
key_name[1] = (int)KE_IGNORE;
48014802
slen = i + 1 + (tp[i] == ESC);
4803+
if (rcs_status == STATUS_SENT
4804+
&& slen < len && tp[slen] == 0x18)
4805+
/* Some older xterm send 0x18 for the T_RS request,
4806+
* skip it here. */
4807+
++slen;
48024808
break;
48034809
}
48044810
}

src/testdir/runtest.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ let s:flaky = [
233233
\ 'Test_quoteplus()',
234234
\ 'Test_quotestar()',
235235
\ 'Test_reltime()',
236+
\ 'Test_terminal_noblock()',
236237
\ 'Test_with_partial_callback()',
237238
\ ]
238239

src/version.c

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

785785
static int included_patches[] =
786786
{ /* Add new patch number below this line */
787+
/**/
788+
1071,
789+
/**/
790+
1070,
791+
/**/
792+
1069,
793+
/**/
794+
1068,
787795
/**/
788796
1067,
789797
/**/

0 commit comments

Comments
 (0)