Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Futarimiti committed Oct 7, 2023
1 parent 1a55342 commit 2c45b83
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/spooky/templates/choose/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ M.choose = function (forced, log, buf, filepaths, user, do_with_choice, preview)
end

if ui == 'builtin' then
require('spooky.templates.choose.builtin').choose_one(filepaths, user, function (x)
local builtin_choose_one = require('spooky.templates.choose.builtin').choose_one
builtin_choose_one(filepaths, user, function (x)
do_with_choice(x)
did_write[buf] = true
end)
else
require('spooky.templates.choose.telescope').choose_one(buf, filepaths, user, function (x)
local telescope_choose_one = require('spooky.templates.choose.telescope').choose_one
telescope_choose_one(buf, filepaths, user, function (x)
do_with_choice(x)
did_write[buf] = true
end, preview)
Expand Down

0 comments on commit 2c45b83

Please sign in to comment.