internal: default option condition optimization

main
bhagwan 3 years ago
parent ccc9ee3e4f
commit 58031b63d9

@ -251,7 +251,7 @@ M.make_entry_file = function(opts, x)
-- fd v8.3 requires adding '--strip-cwd-prefix' to remove
-- the './' prefix, will not work with '--color=always'
-- https://github.com/sharkdp/fd/blob/master/CHANGELOG.md
if opts.strip_cwd_prefix == nil or opts.strip_cwd_prefix then
if not (opts.strip_cwd_prefix == false) then
x = path.strip_cwd_prefix(x)
end
if opts.cwd and #opts.cwd > 0 then

@ -154,7 +154,7 @@ M.live_grep = function(opts)
opts = set_search_header(opts, 2)
opts._reload_command = function(query)
if query and not opts.do_not_save_last_search then
if query and not (opts.save_last_search == false) then
last_search = {}
last_search.no_esc = true
last_search.query = query

@ -624,7 +624,7 @@ M.live_workspace_symbols = function(opts)
opts.winid = vim.api.nvim_get_current_win()
opts._reload_action = function(query)
if query and not opts.do_not_save_last_search then
if query and not (opts.save_last_search == false) then
last_search = {}
last_search.query = query
end

Loading…
Cancel
Save