test/ui: properly test win_hide by explicitly marking hidden grids

This commit is contained in:
Björn Linse
2019-08-17 21:46:11 +02:00
parent 3397b8c51a
commit 6b2d67eb59
3 changed files with 22 additions and 18 deletions

View File

@@ -1212,7 +1212,11 @@ function Screen:render(headers, attr_state, preview)
local rv = {}
for igrid,grid in pairs(self._grids) do
if headers then
table.insert(rv, "## grid "..igrid)
local suffix = ""
if igrid > 1 and self.win_position[igrid] == nil and self.float_pos[igrid] == nil then
suffix = " (hidden)"
end
table.insert(rv, "## grid "..igrid..suffix)
end
for i = 1, grid.height do
local cursor = self._cursor.grid == igrid and self._cursor.row == i