• R/O
  • SSH

vim: 提交

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

修訂9981509b665fea3c13684a836fdab2fd11eefdfb (tree)
時間2020-03-30 01:00:04
作者Bram Moolenaar <Bram@vim....>
CommiterBram Moolenaar

Log Message

patch 8.2.0476: terminal nasty callback test fails sometimes

Commit: https://github.com/vim/vim/commit/52ea92b19d2bc992dd4570add64c12d98eab9db2
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 29 17:50:48 2020 +0200

patch 8.2.0476: terminal nasty callback test fails sometimes
Problem: Terminal nasty callback test fails sometimes.
Solution: use term_wait() instead of a sleep. (Yee Cheng Chin,closes https://github.com/vim/vim/issues/5865)

Change Summary

差異

diff -r 95aa315cc31d -r 9981509b665f src/testdir/test_terminal.vim
--- a/src/testdir/test_terminal.vim Sun Mar 29 16:30:04 2020 +0200
+++ b/src/testdir/test_terminal.vim Sun Mar 29 18:00:04 2020 +0200
@@ -2536,17 +2536,19 @@
25362536 let g:buf1 = term_start('sh', #{hidden: 1, term_finish: 'close'})
25372537 call popup_create(g:buf1, {})
25382538 let g:buf2 = term_start(['sh', '-c'], #{curwin: 1, exit_cb: function('TermExit')})
2539- sleep 100m
2539+ call term_wait(g:buf2, 100)
25402540 call popup_close(win_getid())
25412541 endfunc
25422542 func TermExit(...)
2543- call term_sendkeys(bufnr('#'), "exit\<CR>")
2543+ let altbuf = bufnr('#')
2544+ call term_sendkeys(altbuf, "exit\<CR>")
2545+ call term_wait(altbuf)
25442546 call popup_close(win_getid())
25452547 endfunc
25462548 call OpenTerms()
25472549
25482550 call term_sendkeys(g:buf0, "exit\<CR>")
2549- sleep 100m
2551+ call term_wait(g:buf0, 100)
25502552 exe g:buf0 .. 'bwipe!'
25512553 set hidden&
25522554 endfunc
diff -r 95aa315cc31d -r 9981509b665f src/version.c
--- a/src/version.c Sun Mar 29 16:30:04 2020 +0200
+++ b/src/version.c Sun Mar 29 18:00:04 2020 +0200
@@ -739,6 +739,8 @@
739739 static int included_patches[] =
740740 { /* Add new patch number below this line */
741741 /**/
742+ 476,
743+/**/
742744 475,
743745 /**/
744746 474,
Show on old repository browser