fix(ui): correct condition for "wrap" flag in a floating grid

In a floating window grid, "wrap" flag should not
be set when vertical borders are used, as the the wrapped
text will be broken up by border chars.

fixes #33719
This commit is contained in:
bfredl
2025-04-30 11:49:47 +02:00
parent 0ab0cdb2da
commit f02484118c
3 changed files with 167 additions and 3 deletions

View File

@@ -1230,12 +1230,13 @@ end
--- @param row integer
--- @param col integer
--- @param items integer[][]
function Screen:_handle_grid_line(grid, row, col, items)
function Screen:_handle_grid_line(grid, row, col, items, wrap)
assert(self._options.ext_linegrid)
assert(#items > 0)
local line = self._grids[grid].rows[row + 1]
local colpos = col + 1
local hl_id = 0
line.wrap = wrap
for _, item in ipairs(items) do
local text, hl_id_cell, count = item[1], item[2], item[3]
if hl_id_cell ~= nil then