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.
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim
index 8c1d357..993498c 100644
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -2333,6 +2333,7 @@
call writefile(text, 'Xtext')
let cmd = GetVimCommandCleanTerm()
let lines = [
+ \ 'set t_u7=',
\ 'call setline(1, range(20))',
\ 'hi PopTerm ctermbg=grey',
\ 'func OpenTerm(setColor)',
@@ -2346,6 +2347,9 @@
\ 'func HidePopup()',
\ ' call popup_hide(s:winid)',
\ 'endfunc',
+ \ 'sleep 10m',
+ \ 'redraw',
+ \ 'echo getwinvar(s:winid, "&buftype") win_gettype(s:winid)',
\ ]
call writefile(lines, 'XtermPopup')
let buf = RunVimInTerminal('-S XtermPopup', #{rows: 15})