tui: flush -V3 ('verbose' >= 3) info ASAP

This commit is contained in:
Justin M. Keyes 2017-12-04 23:31:50 +01:00
parent 837100fcb1
commit 2d4abc1cae
2 changed files with 3 additions and 3 deletions

View File

@ -1073,9 +1073,12 @@ static void show_termcap_event(void **argv)
if (!ut) {
abort();
}
verbose_enter();
// XXX: (future) if unibi_term is modified (e.g. after a terminal
// query-response) this is a race condition.
terminfo_info_msg(ut);
verbose_leave();
verbose_stop(); // flush now
}
#ifdef UNIX

View File

@ -721,9 +721,6 @@ describe("tui", function()
{3:-- TERMINAL --} |
]])
-- Vim flushes the log file on exit.
feed_data('\33:q\n')
retry(nil, 3000, function() -- Wait for log file to be flushed.
local log = read_file('Xtest_tui_verbose_log') or ''
eq('--- Terminal info --- {{{\n', string.match(log, '--- Terminal.-\n'))