I'd like to write a function that toggles the quicklist and when closing it, it returns to the window it was in before the quicklist opening.
I tried to improve some function I found but it does not work as expected:
function! ToggleQuickFix()
if empty(filter(getwininfo(), 'v:val.quickfix'))
copen 20
else
call feedkeys("^W^P")
cclose
endif
endfunction
Asked by MG5
(11 rep)
Nov 2, 2023, 11:32 AM
Last activity: Nov 2, 2023, 11:33 AM
Last activity: Nov 2, 2023, 11:33 AM