diff --git a/vis/.config/vis/fzf.sh b/vis/.config/vis/fzf.sh index baf47e8..1c5524a 100755 --- a/vis/.config/vis/fzf.sh +++ b/vis/.config/vis/fzf.sh @@ -263,6 +263,7 @@ fi exec fzf --query "$3" \ --prompt "$prompt" \ --header-label "$label" \ + --multi \ --ansi \ --delimiter : \ --ghost ' (Use alt-? for help)' \ diff --git a/vis/.config/vis/visrc.lua b/vis/.config/vis/visrc.lua index 43a8504..bd7755c 100644 --- a/vis/.config/vis/visrc.lua +++ b/vis/.config/vis/visrc.lua @@ -93,13 +93,17 @@ end local function fzf_sh(arg) action = function(out) - open_file_pos(out, vis.win.file.modified and 'o' or 'e') + if (out:find('\n') or #out) == #out then + open_file_pos(out, vis.win.file.modified and 'o' or 'e') + else + vis:message(out) + end end local home = os.getenv('HOME') local path = vis.win.file.path or '' local dir = path:match('^.*/') or '' local reg = '' - if reg ~= '"' then + if vis.register ~= '"' then reg = string.gsub(vis.registers[vis.register][1], '%z', '') end local cmd = home .. @@ -111,7 +115,11 @@ end local function search(cmd, action) if action == nil then action = function(out) - open_file_pos(out, 'e') + if (out:find('\n') or #s) == #s then + open_file_pos(out, 'e') + else + vis:message(out) + end end end if cmd:match('^fzf ') and vis.register ~= '"' then