Skip to content

Commit 08f88b1

Browse files
committed
patch 8.0.0539: startup test fails on Mac
Problem: Startup test fails on Mac. Solution: Use another term name, "unknown" is known. Avoid a 2 second delay.
1 parent 85045a7 commit 08f88b1

5 files changed

Lines changed: 15 additions & 2 deletions

File tree

src/main.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,6 +1012,15 @@ common_init(mparm_T *paramp)
10121012
#endif
10131013
}
10141014

1015+
/*
1016+
* Return TRUE when the --not-a-term argument was found.
1017+
*/
1018+
int
1019+
is_not_a_term()
1020+
{
1021+
return params.not_a_term;
1022+
}
1023+
10151024
/*
10161025
* Main loop: Execute Normal mode commands until exiting Vim.
10171026
* Also used to handle commands in the command-line window, until the window

src/proto/main.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* main.c */
22
int vim_main2(void);
33
void common_init(mparm_T *paramp);
4+
int is_not_a_term(void);
45
void main_loop(int cmdwin, int noexmode);
56
void getout_preserve_modified(int exitval);
67
void getout(int exitval);

src/term.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1705,7 +1705,8 @@ set_termname(char_u *term)
17051705
{
17061706
screen_start(); /* don't know where cursor is now */
17071707
out_flush();
1708-
ui_delay(2000L, TRUE);
1708+
if (!is_not_a_term())
1709+
ui_delay(2000L, TRUE);
17091710
}
17101711
set_string_option_direct((char_u *)"term", -1, term,
17111712
OPT_FREE, 0);

src/testdir/test_startup.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func Test_default_term()
216216
endif
217217

218218
let save_term = $TERM
219-
let $TERM = 'unknown'
219+
let $TERM = 'unknownxxx'
220220
let out = system(GetVimCommand() . ' -c''set term'' -c cq')
221221
call assert_match("defaulting to 'ansi'", out)
222222
let $TERM = save_term

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+
539,
767769
/**/
768770
538,
769771
/**/

0 commit comments

Comments
 (0)