Mercurial > vim
changeset 11307:6e1c19d3de03 v8.0.0539
patch 8.0.0539: startup test fails on Mac
commit https://github.com/vim/vim/commit/08f88b139d2f93661ed2b17214ee6b308b4edb5b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Apr 2 17:21:16 2017 +0200
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 02 Apr 2017 17:30:05 +0200 |
parents | 992807fb66f3 |
children | b6b88d1c0c24 |
files | src/main.c src/proto/main.pro src/term.c src/testdir/test_startup.vim src/version.c |
diffstat | 5 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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.
--- 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);
--- 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);
--- 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