]> granicus.if.org Git - vim/commitdiff
patch 8.0.0539: startup test fails on Mac v8.0.0539
authorBram Moolenaar <Bram@vim.org>
Sun, 2 Apr 2017 15:21:16 +0000 (17:21 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 2 Apr 2017 15:21:16 +0000 (17:21 +0200)
Problem:    Startup test fails on Mac.
Solution:   Use another term name, "unknown" is known. Avoid a 2 second delay.

src/main.c
src/proto/main.pro
src/term.c
src/testdir/test_startup.vim
src/version.c

index 78b61228aa178aecc7b2515c09cd549656db26a8..e3db0b2a916ebe072488aa468b2430e13f945d02 100644 (file)
@@ -1012,6 +1012,15 @@ common_init(mparm_T *paramp)
 #endif
 }
 
+/*
+ * 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
index f8abb94b59219d593aaa45047f910b3242f4e328..278d1addfd982bf0dbad67a8e17f383915055b58 100644 (file)
@@ -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);
index 75c9fbfdef710790132846ec13d29f52ed478474..cac47da06f1984a2128d42763daccabecee63dfb 100644 (file)
@@ -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);
index 2185b4dc206a8a2b5e4293f787901a909c58a8b4..bce431f7ddc21f2bb4bc7a3302d6a129e2fbf37b 100644 (file)
@@ -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
index 8de7e66848b6bec64860e94a3e46edba4dba9d41..3a6070b9873e629a75757a5d6c825e4337779435 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    539,
 /**/
     538,
 /**/