Closed asmodeus812 closed 3 months ago
The reason is to be able to do something like that
function _G.list_default_action(ctx)
if ctx and #ctx.targets > 1 then
-- send to qflist
return "quickfix"
else
-- default
return nil
end
end
function! Listaction(ctx)
" do execute quickfix or default action
return v:lua.list_default_action(a:ctx)
endfunction
"<CR>": "expr:Listaction",
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 98.56%. Comparing base (
846994b
) to head (30f56c7
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This should allow the expression function to return nil, to by default execute the default action of the list, as there are no easy ways to extract the name of the default action for the current list. doAction by default if no 'name' is provided would fallback to the defaultAction.