fix(previewer): buffer previews for term not initially scrolled (#2899)
This commit is contained in:
@@ -579,7 +579,10 @@ previewers.vimgrep = defaulter(function(opts)
|
||||
if entry.bufnr and (p == "[No Name]" or has_buftype) then
|
||||
local lines = vim.api.nvim_buf_get_lines(entry.bufnr, 0, -1, false)
|
||||
vim.api.nvim_buf_set_lines(self.state.bufnr, 0, -1, false, lines)
|
||||
jump_to_line(self, self.state.bufnr, entry)
|
||||
-- schedule so that the lines are actually there and can be jumped onto when we call jump_to_line
|
||||
vim.schedule(function()
|
||||
jump_to_line(self, self.state.bufnr, entry)
|
||||
end)
|
||||
else
|
||||
conf.buffer_previewer_maker(p, self.state.bufnr, {
|
||||
bufname = self.state.bufname,
|
||||
|
||||
Reference in New Issue
Block a user