From 9c005ec0e68984772f2c2a0bff4c7399e44cfe03 Mon Sep 17 00:00:00 2001 From: TheBlob42 Date: Fri, 2 Feb 2024 14:32:05 +0100 Subject: [PATCH] fix: window layout restorage --- lua/fzf-lua/win.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/fzf-lua/win.lua b/lua/fzf-lua/win.lua index e6520724..814f1858 100644 --- a/lua/fzf-lua/win.lua +++ b/lua/fzf-lua/win.lua @@ -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) - 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