Skip to content

Commit

Permalink
fix: window layout restorage
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlob42 authored and ibhagwan committed Feb 2, 2024
1 parent df4df1c commit 9c005ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lua/fzf-lua/win.lua
Original file line number Diff line number Diff line change
Expand Up @@ -942,18 +942,18 @@ function FzfWin:close(fzf_bufnr)
-- remove all windows from the restore cmd that have been closed in the meantime
-- if we're not doing this the result might be all over the place
local winnrs = vim.tbl_map(function(win)

This comment has been minimized.

Copy link
@asmodeus812

asmodeus812 Feb 7, 2024

Contributor

@TheBlob42 still not really working at all with neogit for example.

This comment has been minimized.

Copy link
@TheBlob42

TheBlob42 Feb 7, 2024

Author Contributor

Can you please record a GIF/video and reopen the corresponding ticket? I have an assumption, but I would like to see the issue in combination with neogit first 🤔

return vim.api.nvim_win_get_number(win)
return vim.api.nvim_win_get_number(win) .. ""
end, vim.api.nvim_tabpage_list_wins(0))

local cmd = ""
local cmd = {}
for cmd_part in string.gmatch(self.winrestcmd, "[^|]+") do
local winnr = cmd_part:match("(.)resize")
if vim.tbl_contains(winnrs, winnr) then
cmd = cmd .. cmd_part
table.insert(cmd, cmd_part)
end
end

vim.cmd(cmd)
vim.cmd(table.concat(cmd, "|"))
end
if self.hls_on_close then
-- restore search highlighting if we disabled it
Expand Down

0 comments on commit 9c005ec

Please sign in to comment.