You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inspired by this plugin, I'm experimenting with fzf#run myself, and its terminal command returns 1 if there's an error with the command or 130 if nothing is chosen (I tested pressing both Esc and Ctrl+C).
Therefore, you can check v:event to capture the fzf command exit status and only run the cancel callback when the status is not 0 (or only when it's 130 depending on how you want to handle errors). You can do that in a TermClose autocmd, instead of deferring a callback using BufLeave.
The text was updated successfully, but these errors were encountered:
Inspired by this plugin, I'm experimenting with
fzf#run
myself, and its terminal command returns1
if there's an error with the command or130
if nothing is chosen (I tested pressing both Esc and Ctrl+C).Therefore, you can check
v:event
to capture thefzf
command exit status and only run the cancel callback when the status is not0
(or only when it's130
depending on how you want to handle errors). You can do that in aTermClose
autocmd, instead of deferring a callback usingBufLeave
.The text was updated successfully, but these errors were encountered: