diff --git a/plugin/fzf.vim b/plugin/fzf.vim index e6aecf40..d9ced8ef 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -228,10 +228,11 @@ function! s:execute(dict, command, temps) execute 'silent !'.command redraw! if v:shell_error - " Do not print error message on exit status 1 - if v:shell_error > 2 + " Do not print error message on exit status 1 (no match) or 130 (interrupt) + if v:shell_error == 2 echohl ErrorMsg echo 'Error running ' . command + echohl None endif return [] else diff --git a/src/constants.go b/src/constants.go index 9a4fc29f..1cc4f81f 100644 --- a/src/constants.go +++ b/src/constants.go @@ -49,7 +49,8 @@ const ( ) const ( - exitOk = 0 - exitNoMatch = 1 - exitError = 2 + exitOk = 0 + exitNoMatch = 1 + exitError = 2 + exitInterrupt = 130 ) diff --git a/src/terminal.go b/src/terminal.go index 5e8300f9..9a92ba43 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -791,7 +791,7 @@ func (t *Terminal) Loop() { exit(exitNoMatch) case reqQuit: C.Close() - exit(exitError) + exit(exitInterrupt) } } t.placeCursor()