Skip to content

Commit f52ce3d

Browse files
fix(api): Provide template when refiling from capture window
1 parent c358d95 commit f52ce3d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lua/orgmode/api/init.lua

+4
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ function OrgApi.refile(opts)
8585

8686
local source_bufnr = vim.fn.bufnr(opts.source.file.filename) or -1
8787

88+
if orgmode.capture._window then
89+
refile_opts.template = orgmode.capture._window.template
90+
end
91+
8892
orgmode.capture:process_refile(refile_opts)
8993

9094
if source_bufnr > -1 and vim.b[source_bufnr].org_capture then

0 commit comments

Comments
 (0)