diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-04-02 17:21:16 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-04-02 17:21:16 +0200 |
commit | 08f88b139d2f93661ed2b17214ee6b308b4edb5b (patch) | |
tree | 5f8c2ccb84fe903f97bf87d0dff2a5741bca6b99 | |
parent | 85045a73db258a054a17fd52a67eb5cd02a788dc (diff) | |
download | vim-git-08f88b139d2f93661ed2b17214ee6b308b4edb5b.tar.gz |
patch 8.0.0539: startup test fails on Macv8.0.0539
Problem: Startup test fails on Mac.
Solution: Use another term name, "unknown" is known. Avoid a 2 second delay.
-rw-r--r-- | src/main.c | 9 | ||||
-rw-r--r-- | src/proto/main.pro | 1 | ||||
-rw-r--r-- | src/term.c | 3 | ||||
-rw-r--r-- | src/testdir/test_startup.vim | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
5 files changed, 15 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c index 78b61228a..e3db0b2a9 100644 --- a/src/main.c +++ b/src/main.c @@ -1013,6 +1013,15 @@ common_init(mparm_T *paramp) } /* + * Return TRUE when the --not-a-term argument was found. + */ + int +is_not_a_term() +{ + return params.not_a_term; +} + +/* * Main loop: Execute Normal mode commands until exiting Vim. * Also used to handle commands in the command-line window, until the window * is closed. diff --git a/src/proto/main.pro b/src/proto/main.pro index f8abb94b5..278d1addf 100644 --- a/src/proto/main.pro +++ b/src/proto/main.pro @@ -1,6 +1,7 @@ /* main.c */ int vim_main2(void); void common_init(mparm_T *paramp); +int is_not_a_term(void); void main_loop(int cmdwin, int noexmode); void getout_preserve_modified(int exitval); void getout(int exitval); diff --git a/src/term.c b/src/term.c index 75c9fbfde..cac47da06 100644 --- a/src/term.c +++ b/src/term.c @@ -1705,7 +1705,8 @@ set_termname(char_u *term) { screen_start(); /* don't know where cursor is now */ out_flush(); - ui_delay(2000L, TRUE); + if (!is_not_a_term()) + ui_delay(2000L, TRUE); } set_string_option_direct((char_u *)"term", -1, term, OPT_FREE, 0); diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim index 2185b4dc2..bce431f7d 100644 --- a/src/testdir/test_startup.vim +++ b/src/testdir/test_startup.vim @@ -216,7 +216,7 @@ func Test_default_term() endif let save_term = $TERM - let $TERM = 'unknown' + let $TERM = 'unknownxxx' let out = system(GetVimCommand() . ' -c''set term'' -c cq') call assert_match("defaulting to 'ansi'", out) let $TERM = save_term diff --git a/src/version.c b/src/version.c index 8de7e6684..3a6070b98 100644 --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 539, +/**/ 538, /**/ 537, |