diff runtime/doc/eval.txt @ 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 6c944fee0d7e
children bd9069d21c5d
line wrap: on
line diff
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -10328,6 +10328,23 @@ win_getid([{win} [, {tab}]])				*win_get
 		Can also be used as a |method|: >
 			GetWinnr()->win_getid()
 
+
+win_gettype([{nr}])					*win_gettype()*
+		Return the type of the window:
+			"popup"		popup window |popup|
+			"command"	command-line window |cmdwin|
+			(empty)		normal window
+			"unknown"	window {nr} not found
+
+		When {nr} is omitted return the type of the current window.
+		When {nr} is given return the type of this window by number or
+		|window-ID|.
+
+		Also see the 'buftype' option.  When running a terminal in a
+		popup window then 'buftype' is "terminal" and win_gettype()
+		returns "popup".
+
+
 win_gotoid({expr})					*win_gotoid()*
 		Go to window with ID {expr}.  This may also change the current
 		tabpage.