fix(winfloat): last_status when changing split to floatwin

Problem: converting a split to a floatwin may not remove the last statusline
when needed. (e.g: 'ls' is 1)

Solution: call last_status/win_comp_pos in win_new_float, after win_remove.

Also fix float_pos formatting for screen snapshots so it doesn't give a nil
error for external windows.

Not an issue from this PR.
This commit is contained in:
Sean Dewar
2026-03-12 09:19:06 +00:00
parent 7be4ae796f
commit 3325536150
5 changed files with 53 additions and 9 deletions

View File

@@ -1795,9 +1795,14 @@ local function fmt_ext_state(name, state)
elseif name == 'float_pos' then
local str = '{\n'
for k, v in pairs(state) do
str = str .. ' [' .. k .. '] = {' .. v[1]
for i = 2, #v do
str = str .. ', ' .. inspect(v[i])
str = str .. ' [' .. k .. '] = {'
if v.external then
str = str .. ' external = true '
else
str = str .. v[1]
for i = 2, #v do
str = str .. ', ' .. inspect(v[i])
end
end
str = str .. '};\n'
end