mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 10:30:05 +08:00
perf(flygrep): improve quickfix support
This commit is contained in:
parent
5f20e4710b
commit
b2bb63b100
@ -24,7 +24,7 @@ let s:default = {
|
||||
\ 'min_size' : 3,
|
||||
\ 'width' : 1,
|
||||
\ 'right_offset' : 1,
|
||||
\ 'excluded_filetypes' : ['startify', 'git-commit','leaderf', 'NvimTree', 'tagbar', 'defx'],
|
||||
\ 'excluded_filetypes' : ['startify', 'git-commit','leaderf', 'NvimTree', 'tagbar', 'defx', 'neo-tree', 'qf'],
|
||||
\ 'shape' : {
|
||||
\ 'head' : '▲',
|
||||
\ 'body' : '█',
|
||||
|
@ -440,6 +440,8 @@ local function apply_to_quickfix()
|
||||
mpt._handle_fly = flygrep
|
||||
if vim.fn.getbufline(buffer_id, 1)[1] ~= '' then
|
||||
if grepid ~= 0 then
|
||||
-- stop job, and skip callback function
|
||||
grepid = 0
|
||||
jobstop(grepid)
|
||||
end
|
||||
mpt._quit = true
|
||||
@ -464,7 +466,8 @@ local function apply_to_quickfix()
|
||||
lines = searching_result,
|
||||
})
|
||||
mpt._clear_prompt()
|
||||
vim.cmd('copen')
|
||||
-- use botright to make sure quicfix windows width same as screen
|
||||
vim.cmd('botright copen')
|
||||
end
|
||||
vim.cmd('noautocmd normal! :')
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user