Mercurial > vim
comparison src/testdir/test_popupwin.vim @ 19275:2142fb624658 v8.2.0196
patch 8.2.0196: blocking commands for a finished job in a popup window
Commit: https://github.com/vim/vim/commit/d98c0b63abd7b0e61a383669474abe96044615af
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Feb 2 15:25:16 2020 +0100
patch 8.2.0196: blocking commands for a finished job in a popup window
Problem: Blocking commands for a finished job in a popup window.
Solution: Do not block commands if the job has finished. Adjust test.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 02 Feb 2020 15:30:04 +0100 |
parents | c53dbbf3229b |
children | 1d6bc6b31c2e |
comparison
equal
deleted
inserted
replaced
19274:ca1f1b78a0b4 | 19275:2142fb624658 |
---|---|
2394 call delete('XsomeFile') | 2394 call delete('XsomeFile') |
2395 endfunc | 2395 endfunc |
2396 | 2396 |
2397 func Test_popupwin_terminal_buffer() | 2397 func Test_popupwin_terminal_buffer() |
2398 CheckFeature terminal | 2398 CheckFeature terminal |
2399 | 2399 CheckUnix |
2400 | |
2401 let origwin = win_getid() | |
2400 let ptybuf = term_start(&shell, #{hidden: 1}) | 2402 let ptybuf = term_start(&shell, #{hidden: 1}) |
2401 call assert_fails('let winnr = popup_create(ptybuf, #{})', 'E278:') | 2403 let winnr = popup_create(ptybuf, #{minwidth: 40, minheight: 10}) |
2402 exe 'bwipe! ' .. ptybuf | 2404 " Wait for shell to start |
2405 sleep 200m | |
2406 " Cannot quit while job is running | |
2407 call assert_fails('call feedkeys("\<C-W>:quit\<CR>", "xt")', 'E948:') | |
2408 call feedkeys("exit\<CR>", 'xt') | |
2409 " Wait for shell to exit | |
2410 sleep 100m | |
2411 call feedkeys(":quit\<CR>", 'xt') | |
2412 call assert_equal(origwin, win_getid()) | |
2403 endfunc | 2413 endfunc |
2404 | 2414 |
2405 func Test_popupwin_with_buffer_and_filter() | 2415 func Test_popupwin_with_buffer_and_filter() |
2406 new Xwithfilter | 2416 new Xwithfilter |
2407 call setline(1, range(100)) | 2417 call setline(1, range(100)) |