default map 'ctrl-z' to 'abort' (closes issue #172)

main
bhagwan 3 years ago
parent 913c3c650d
commit 2c04f7495f

@ -252,6 +252,7 @@ require'fzf-lua'.setup {
},
fzf = {
-- fzf '--bind=' options
["ctrl-z"] = "abort",
["ctrl-u"] = "unix-line-discard",
["ctrl-f"] = "half-page-down",
["ctrl-b"] = "half-page-up",

@ -286,6 +286,7 @@ Consult the list below for available settings:
},
fzf = {
-- fzf '--bind=' options
["ctrl-z"] = "abort",
["ctrl-u"] = "unix-line-discard",
["ctrl-f"] = "half-page-down",
["ctrl-b"] = "half-page-up",

@ -47,6 +47,7 @@ M.globals = {
["<S-left>"] = "preview-page-reset",
},
fzf = {
["ctrl-z"] = "abort",
["ctrl-u"] = "unix-line-discard",
["ctrl-f"] = "half-page-down",
["ctrl-b"] = "half-page-up",

@ -204,7 +204,7 @@ end
function FzfWin:check_exit_status(exit_code)
if not self:validate() then return end
if not exit_code or tonumber(exit_code) ~= 130 then
if not exit_code or (exit_code ~=0 and exit_code ~= 130) then
local lines = vim.api.nvim_buf_get_lines(self.fzf_bufnr, 0, 1, false)
-- this can happen before nvim-fzf returned exit code (PR #36)
if not exit_code and (not lines or #lines[1]==0) then return end

Loading…
Cancel
Save