Skip to content

Commit bdfedf6

Browse files
phanenibhagwan
authored andcommitted
fix(serverlist): sync screen size to preview when server have attached tui
1 parent ac9b7de commit bdfedf6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lua/fzf-lua/previewer/fzf.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,12 @@ local function make_screenshot(screenshot, addr, lines, columns)
526526
end
527527
local has_tui = vim.iter(uis):find(function(info) return info.stdout_tty end)
528528
if has_tui then
529-
utils.rpcexec(addr, "nvim__screenshot", screenshot)
529+
utils.rpcexec(addr, "nvim_exec_lua", [[
530+
local lines, columns, screenshot = ...
531+
return vim._with({ go = { lines = lines, columns = columns } }, function()
532+
api.nvim__screenshot(screenshot)
533+
end)
534+
]], { lines, columns, screenshot })
530535
return
531536
end
532537
local jobstart = _G.fzf_pty_spawn or vim.fn.jobstart

0 commit comments

Comments
 (0)