summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/README.md b/README.md
index 587ebc1..9f02f5c 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,11 @@ fzy can be integrated very simply in vim. There is also [fzy-vim](https://github
``` vim
function! FzyCommand(choice_command, vim_command)
- silent let output = system(a:choice_command . " | fzy ")
+ try
+ silent let output = system(a:choice_command . " | fzy ")
+ catch /Vim:Interrupt/
+ " Swallow errors from ^C, allow redraw! below
+ endtry
redraw!
if v:shell_error == 0 && !empty(output)
exec a:vim_command . ' ' . output