mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-04-14 15:19:12 +08:00
perf(flygrep): use noautocmd to update buffer
This commit is contained in:
parent
7a6ffd9524
commit
3be76bca65
@ -164,13 +164,15 @@ local function grep_stdout(id, data, _)
|
|||||||
if id ~= grepid then
|
if id ~= grepid then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local datas = vim.fn.filter(data, '!empty(v:val)')
|
noautocmd(function()
|
||||||
-- let datas = s:LIST.uniq_by_func(datas, function('s:file_line'))
|
local datas = vim.fn.filter(data, '!empty(v:val)')
|
||||||
if vim.fn.getbufline(buffer_id, 1)[1] == '' then
|
-- let datas = s:LIST.uniq_by_func(datas, function('s:file_line'))
|
||||||
vim.api.nvim_buf_set_lines(buffer_id, 0, -1, false, datas)
|
if vim.fn.getbufline(buffer_id, 1)[1] == '' then
|
||||||
else
|
vim.api.nvim_buf_set_lines(buffer_id, 0, -1, false, datas)
|
||||||
vim.api.nvim_buf_set_lines(buffer_id, -1, -1, false, datas)
|
else
|
||||||
end
|
vim.api.nvim_buf_set_lines(buffer_id, -1, -1, false, datas)
|
||||||
|
end
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function grep_stderr(_, data, _)
|
local function grep_stderr(_, data, _)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user