After opening a file that I was just previewing, the Search highlight persists
joeytwiddle opened this issue · comments
Paul "Joey" Clark commented
Matthew Bright commented
This is meant to be cleaned up by the following code:
function! QuickrPreviewExit()
pclose!
execute 'sign unplace 26'
endfunction
function! QuickrPreviewSetupExit()
if &buftype == 'quickfix'
autocmd BufDelete <buffer> call QuickrPreviewExit()
endif
endfunction
augroup quickfix_cmds
autocmd!
autocmd BufCreate * call QuickrPreviewSetupExit()
augroup END
Can you confirm whether the BufDelete
auto command is being triggered?
Ronak Gandhi commented
BufDelete
should be getting triggered.
Matthew Bright commented
Sorry, ignore my previous comment. That will only work when closing/deleting the quickfix buffer, rather then when opening a file that was being previewed.
Commit ed3b58d will resolve this issue for unlisted buffers. I'll create another commit for listed buffers.
Paul "Joey" Clark commented
Tested it here, and the issue is no longer occurring. Fantastic work!