1
0
forked from aniani/vim

patch 8.1.0834: GUI may wait too long before dealing with messages

Problem:    GUI may wait too long before dealing with messages.  Returning
            early may cause a mapping to time out.
Solution:   Use the waiting loop from Unix also for the GUI.
            (closes #3817, closes #3824)
This commit is contained in:
Bram Moolenaar
2019-01-27 16:55:47 +01:00
parent d93090f41f
commit e40b9d47bf
6 changed files with 297 additions and 214 deletions

View File

@@ -58,6 +58,10 @@ func RunVimInTerminal(arguments, options)
let cmd .= ' -v ' . a:arguments
let buf = term_start(cmd, {'curwin': 1, 'term_rows': rows, 'term_cols': cols})
if &termwinsize == ''
" in the GUI we may end up with a different size, try to set it.
if term_getsize(buf) != [rows, cols]
call term_setsize(buf, rows, cols)
endif
call assert_equal([rows, cols], term_getsize(buf))
else
let rows = term_getsize(buf)[0]