Browse code

Add catch /Vim:Interrupt/ to README.md

Seems to be necessary on some systems.

John Hawthorn authored on 15/09/2014 00:41:08
Showing 1 changed files

... ...
@@ -24,7 +24,11 @@ fzy can be integrated very simply in vim. There is also [fzy-vim](https://github
24 24
 
25 25
 ``` vim
26 26
 function! FzyCommand(choice_command, vim_command)
27
-  silent let output = system(a:choice_command . " | fzy ")
27
+  try
28
+    silent let output = system(a:choice_command . " | fzy ")
29
+  catch /Vim:Interrupt/
30
+    " Swallow errors from ^C, allow redraw! below
31
+  endtry
28 32
   redraw!
29 33
   if v:shell_error == 0 && !empty(output)
30 34
     exec a:vim_command . ' ' . output