Mercurial > vim
comparison src/testdir/test_terminal.vim @ 12086:69f2392e6cfb v8.0.0923
patch 8.0.0923: crash in GUI when terminal job exits
commit https://github.com/vim/vim/commit/679653e59c6da7f6abc29470ef9d404582bacbb9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 13 14:13:19 2017 +0200
patch 8.0.0923: crash in GUI when terminal job exits
Problem: Crash in GUI when terminal job exits. (Kazunobu Kuriyama)
Solution: reset in_terminal_loop when a terminal is freed.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 13 Aug 2017 14:15:03 +0200 |
parents | f4e1e1e6886b |
children | 0a61213afdd2 |
comparison
equal
deleted
inserted
replaced
12085:1d822821df72 | 12086:69f2392e6cfb |
---|---|
412 call term_wait(buf) | 412 call term_wait(buf) |
413 call assert_equal('correct', getline(2)) | 413 call assert_equal('correct', getline(2)) |
414 | 414 |
415 exe buf . 'bwipe' | 415 exe buf . 'bwipe' |
416 endfunc | 416 endfunc |
417 | |
418 " must be last, we can't go back from GUI to terminal | |
419 func Test_zz_terminal_in_gui() | |
420 if !has('gui') | |
421 return | |
422 endif | |
423 gui -f | |
424 | |
425 call assert_equal(1, winnr('$')) | |
426 let buf = Run_shell_in_terminal({'term_finish': 'close'}) | |
427 call Stop_shell_in_terminal(buf) | |
428 call term_wait(buf) | |
429 | |
430 " closing window wipes out the terminal buffer a with finished job | |
431 call WaitFor("winnr('$') == 1") | |
432 call assert_equal(1, winnr('$')) | |
433 call assert_equal("", bufname(buf)) | |
434 | |
435 unlet g:job | |
436 endfunc |