comparison src/testdir/test_terminal.vim @ 19398:f0033a10b613 v8.2.0257

patch 8.2.0257: cannot recognize a terminal in a popup window Commit: https://github.com/vim/vim/commit/00f3b4e007af07870168bf044cecc9d544483953 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Feb 14 14:32:22 2020 +0100 patch 8.2.0257: cannot recognize a terminal in a popup window Problem: Cannot recognize a terminal in a popup window. Solution: Add the win_gettype() function.
author Bram Moolenaar <Bram@vim.org>
date Fri, 14 Feb 2020 14:45:04 +0100
parents 734ca70c1f12
children 763775897f2e
comparison
equal deleted inserted replaced
19397:826264ce48ff 19398:f0033a10b613
2331 in a popup window 2331 in a popup window
2332 END 2332 END
2333 call writefile(text, 'Xtext') 2333 call writefile(text, 'Xtext')
2334 let cmd = GetVimCommandCleanTerm() 2334 let cmd = GetVimCommandCleanTerm()
2335 let lines = [ 2335 let lines = [
2336 \ 'set t_u7=',
2336 \ 'call setline(1, range(20))', 2337 \ 'call setline(1, range(20))',
2337 \ 'hi PopTerm ctermbg=grey', 2338 \ 'hi PopTerm ctermbg=grey',
2338 \ 'func OpenTerm(setColor)', 2339 \ 'func OpenTerm(setColor)',
2339 \ " let buf = term_start('" .. cmd .. " Xtext', #{hidden: 1, term_finish: 'close'})", 2340 \ " let buf = term_start('" .. cmd .. " Xtext', #{hidden: 1, term_finish: 'close'})",
2340 \ ' let s:winid = popup_create(buf, #{minwidth: 45, minheight: 7, border: [], drag: 1, resize: 1})', 2341 \ ' let s:winid = popup_create(buf, #{minwidth: 45, minheight: 7, border: [], drag: 1, resize: 1})',
2344 \ 'endfunc', 2345 \ 'endfunc',
2345 \ 'call OpenTerm(0)', 2346 \ 'call OpenTerm(0)',
2346 \ 'func HidePopup()', 2347 \ 'func HidePopup()',
2347 \ ' call popup_hide(s:winid)', 2348 \ ' call popup_hide(s:winid)',
2348 \ 'endfunc', 2349 \ 'endfunc',
2350 \ 'sleep 10m',
2351 \ 'redraw',
2352 \ 'echo getwinvar(s:winid, "&buftype") win_gettype(s:winid)',
2349 \ ] 2353 \ ]
2350 call writefile(lines, 'XtermPopup') 2354 call writefile(lines, 'XtermPopup')
2351 let buf = RunVimInTerminal('-S XtermPopup', #{rows: 15}) 2355 let buf = RunVimInTerminal('-S XtermPopup', #{rows: 15})
2352 call VerifyScreenDump(buf, 'Test_terminal_popup_1', {}) 2356 call VerifyScreenDump(buf, 'Test_terminal_popup_1', {})
2353 2357