Skip to content
Snippets Groups Projects
Commit ca19762e authored by Junegunn Choi's avatar Junegunn Choi
Browse files

Exit status 130 when fzf is terminated by the user

Related: #345
parent 8764be07
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -49,7 +49,8 @@ const (
)
const (
exitOk = 0
exitNoMatch = 1
exitError = 2
exitOk = 0
exitNoMatch = 1
exitError = 2
exitInterrupt = 130
)
......@@ -791,7 +791,7 @@ func (t *Terminal) Loop() {
exit(exitNoMatch)
case reqQuit:
C.Close()
exit(exitError)
exit(exitInterrupt)
}
}
t.placeCursor()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment