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

perf(flygrep): enable cursorline in preview win

This commit is contained in:
Eric Wong 2025-01-31 15:29:17 +08:00
parent cf20c2ba68
commit 4ea7664a60
No known key found for this signature in database
GPG Key ID: 41BB7053E835C848

View File

@ -175,6 +175,7 @@ local function toggle_preview_win()
-- title_pos = 'center',
-- noautocmd = true,
})
vim.api.nvim_set_option_value('cursorline', true, { win = preview_winid })
local winopt = vim.api.nvim_win_get_config(result_winid)
winopt.row = start_row + math.floor((screen_height - 5) / 2) + 2
winopt.height = screen_height - 5 - math.floor((screen_height - 5) / 2) - 2
@ -243,6 +244,7 @@ local function open_win()
-- title_pos = 'center',
-- noautocmd = true,
})
vim.api.nvim_set_option_value('cursorline', true, { win = preview_winid })
result_bufid = vim.api.nvim_create_buf(false, true)
result_winid = vim.api.nvim_open_win(result_bufid, false, {
relative = 'editor',