To: vim_dev@googlegroups.com Subject: Patch 8.0.1454 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1454 Problem: When in silent mode too much output is buffered. Solution: Use line buffering instead of fully buffered. (Brian M. Carlson, closes #2537) Files: src/main.c *** ../vim-8.0.1453/src/main.c 2018-01-31 20:51:40.305835913 +0100 --- src/main.c 2018-02-03 14:37:29.701881785 +0100 *************** *** 359,364 **** --- 359,371 ---- */ check_tty(¶ms); + #ifdef _IOLBF + /* Ensure output works usefully without a tty: buffer lines instead of + * fully buffered. */ + if (silent_mode) + setvbuf(stdout, NULL, _IOLBF, 0); + #endif + /* This message comes before term inits, but after setting "silent_mode" * when the input is not a tty. */ if (GARGCOUNT > 1 && !silent_mode) *************** *** 2532,2538 **** /* * Print a warning if stdout is not a terminal. ! * When starting in Ex mode and commands come from a file, set Silent mode. */ static void check_tty(mparm_T *parmp) --- 2539,2545 ---- /* * Print a warning if stdout is not a terminal. ! * When starting in Ex mode and commands come from a file, set silent_mode. */ static void check_tty(mparm_T *parmp) *** ../vim-8.0.1453/src/version.c 2018-02-02 18:30:31.643086057 +0100 --- src/version.c 2018-02-03 14:40:31.760605500 +0100 *************** *** 773,774 **** --- 773,776 ---- { /* Add new patch number below this line */ + /**/ + 1454, /**/ -- You cannot propel yourself forward by patting yourself on the back. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///