Mercurial > vim
comparison src/testdir/test_terminal.vim @ 20384:42ab4d40e78f v8.2.0747
patch 8.2.0747: cannot forcefully close all popups
Commit: https://github.com/vim/vim/commit/03a9f848175b182372fb33403998059724a8bf31
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed May 13 13:40:16 2020 +0200
patch 8.2.0747: cannot forcefully close all popups
Problem: Cannot forcefully close all popups.
Solution: Add the "force" argument to popup_clear(). Use it after running a
test. Put back the check for a popup when editing a file.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 13 May 2020 13:45:04 +0200 |
parents | 6bcd12791bf1 |
children | 9f34aae7f69d |
comparison
equal
deleted
inserted
replaced
20383:1ebebb9b62e7 | 20384:42ab4d40e78f |
---|---|
2615 call StopShellInTerminal(buf) | 2615 call StopShellInTerminal(buf) |
2616 endfunc | 2616 endfunc |
2617 | 2617 |
2618 func Test_term_nasty_callback() | 2618 func Test_term_nasty_callback() |
2619 CheckExecutable sh | 2619 CheckExecutable sh |
2620 func OpenTerms() | 2620 |
2621 set hidden | 2621 set hidden |
2622 let g:buf0 = term_start('sh', #{hidden: 1}) | 2622 let g:buf0 = term_start('sh', #{hidden: 1}) |
2623 call popup_create(g:buf0, {}) | 2623 call popup_create(g:buf0, {}) |
2624 let g:buf1 = term_start('sh', #{hidden: 1, term_finish: 'close'}) | 2624 let g:buf1 = term_start('sh', #{hidden: 1, term_finish: 'close'}) |
2625 call popup_create(g:buf1, {}) | 2625 call popup_create(g:buf1, {}) |
2626 let g:buf2 = term_start(['sh', '-c'], #{curwin: 1, exit_cb: function('TermExit')}) | 2626 call assert_fails("call term_start(['sh', '-c'], #{curwin: 1})", 'E863:') |
2627 call TermWait(g:buf2, 50) | 2627 |
2628 call popup_close(win_getid()) | 2628 call popup_clear(1) |
2629 endfunc | |
2630 func TermExit(...) | |
2631 let altbuf = bufnr('#') | |
2632 call term_sendkeys(altbuf, "exit\<CR>") | |
2633 call TermWait(altbuf) | |
2634 call popup_close(win_getid()) | |
2635 endfunc | |
2636 call OpenTerms() | |
2637 | |
2638 call term_sendkeys(g:buf0, "exit\<CR>") | |
2639 call TermWait(g:buf0, 50) | |
2640 exe g:buf0 .. 'bwipe!' | |
2641 set hidden& | 2629 set hidden& |
2642 endfunc | 2630 endfunc |
2643 | 2631 |
2644 func Test_term_and_startinsert() | 2632 func Test_term_and_startinsert() |
2645 CheckRunVimInTerminal | 2633 CheckRunVimInTerminal |