Mercurial > vim
comparison src/testdir/test_popupwin.vim @ 29046:ab7f050f4335 v8.2.5045
patch 8.2.5045: can escape a terminal popup window when the job is finished
Commit: https://github.com/vim/vim/commit/10db31f9493425a20f1e53d0f214e621f16d65de
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon May 30 17:58:03 2022 +0100
patch 8.2.5045: can escape a terminal popup window when the job is finished
Problem: Can escape a terminal popup window when the job is finished.
Solution: Only check for a finished job where it is relevant.
(closes #10253)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 30 May 2022 19:00:03 +0200 |
parents | 5d71ed834c03 |
children | 86eb4aba16c3 |
comparison
equal
deleted
inserted
replaced
29045:a519aa0dbbb5 | 29046:ab7f050f4335 |
---|---|
2905 | 2905 |
2906 call writefile(range(50), 'Xtestfile') | 2906 call writefile(range(50), 'Xtestfile') |
2907 let lines =<< trim END | 2907 let lines =<< trim END |
2908 vim9script | 2908 vim9script |
2909 | 2909 |
2910 # testing CTRL-W CTRL-W requires two windows | |
2911 split | |
2912 | |
2910 term_start(['cat', 'Xtestfile'], {hidden: true}) | 2913 term_start(['cat', 'Xtestfile'], {hidden: true}) |
2911 ->popup_create({ | 2914 ->popup_create({ |
2912 minwidth: 40, | 2915 minwidth: 40, |
2913 maxwidth: 40, | 2916 maxwidth: 40, |
2914 minheight: 8, | 2917 minheight: 8, |
2923 | 2926 |
2924 " scroll to the middle | 2927 " scroll to the middle |
2925 call term_sendkeys(buf, "50%") | 2928 call term_sendkeys(buf, "50%") |
2926 call VerifyScreenDump(buf, 'Test_popupwin_poptermscroll_2', {}) | 2929 call VerifyScreenDump(buf, 'Test_popupwin_poptermscroll_2', {}) |
2927 | 2930 |
2931 " get error if trying to escape the window | |
2932 call term_sendkeys(buf, "\<C-W>\<C-W>") | |
2933 call VerifyScreenDump(buf, 'Test_popupwin_poptermscroll_3', {}) | |
2934 | |
2928 " close the popupwin. | 2935 " close the popupwin. |
2929 call term_sendkeys(buf, ":q\<CR>") | 2936 call term_sendkeys(buf, ":q\<CR>") |
2930 call VerifyScreenDump(buf, 'Test_popupwin_poptermscroll_3', {}) | 2937 call VerifyScreenDump(buf, 'Test_popupwin_poptermscroll_4', {}) |
2931 | 2938 |
2932 call StopVimInTerminal(buf) | 2939 call StopVimInTerminal(buf) |
2933 call delete('Xtestfile') | 2940 call delete('Xtestfile') |
2934 call delete('Xpterm') | 2941 call delete('Xpterm') |
2935 endfunc | 2942 endfunc |