1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-14 05:37:57 +08:00

perf(flygrep): update preview buf after C-p

This commit is contained in:
Eric Wong 2025-02-01 10:49:14 +08:00
parent c0bda08615
commit 3b6a30e336
No known key found for this signature in database
GPG Key ID: 41BB7053E835C848

View File

@ -180,6 +180,8 @@ local function toggle_preview_win()
winopt.row = start_row + math.floor((screen_height - 5) / 2) + 2
winopt.height = screen_height - 5 - math.floor((screen_height - 5) / 2) - 2
vim.api.nvim_win_set_config(result_winid, winopt)
vim.fn.timer_stop(preview_timer_id)
preview_timer_id = vim.fn.timer_start(500, preview_timer, { ['repeat'] = 1 })
else
vim.api.nvim_win_close(preview_winid, true)
local winopt = vim.api.nvim_win_get_config(result_winid)