Skip to content

Commit 4116a64

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents c8aa5fb + c902609 commit 4116a64

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

src/globals.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,9 @@ EXTERN int cterm_normal_bg_color INIT(= 0);
380380
EXTERN guicolor_T cterm_normal_fg_gui_color INIT(= INVALCOLOR);
381381
EXTERN guicolor_T cterm_normal_bg_gui_color INIT(= INVALCOLOR);
382382
#endif
383+
#ifdef FEAT_TERMRESPONSE
384+
EXTERN int is_mac_terminal INIT(= FALSE); /* recognized Terminal.app */
385+
#endif
383386

384387
#ifdef FEAT_AUTOCMD
385388
EXTERN int autocmd_busy INIT(= FALSE); /* Is apply_autocmds() busy? */

src/syntax.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7350,6 +7350,12 @@ lookup_color(int idx, int foreground, int *boldp)
73507350
else
73517351
color = color_numbers_8[idx];
73527352
}
7353+
#ifdef FEAT_TERMRESPONSE
7354+
if (t_colors >= 256 && color == 15 && is_mac_terminal)
7355+
/* Terminal.app has a bug: 15 is light grey. Use white
7356+
* from the color cube instead. */
7357+
color = 231;
7358+
#endif
73537359
}
73547360
return color;
73557361
}

src/term.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4563,7 +4563,10 @@ check_termcode(
45634563
/* Mac Terminal.app sends 1;95;0 */
45644564
if (version == 95
45654565
&& STRNCMP(tp + extra - 2, "1;95;0c", 7) == 0)
4566+
{
45664567
is_not_xterm = TRUE;
4568+
is_mac_terminal = TRUE;
4569+
}
45674570

45684571
/* Gnome terminal sends 1;3801;0, 1;4402;0 or 1;2501;0.
45694572
* xfce4-terminal sends 1;2802;0.

src/version.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,10 @@ static char *(features[]) =
776776

777777
static int included_patches[] =
778778
{ /* Add new patch number below this line */
779+
/**/
780+
1175,
781+
/**/
782+
1174,
779783
/**/
780784
1173,
781785
/**/

0 commit comments

Comments
 (0)