Skip to content

Commit 5a5b486

Browse files
fix(capture): Move on_close event to the end
1 parent 606c747 commit 5a5b486

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lua/orgmode/capture/init.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ function Capture:on_refile_close()
7373
if not opts then
7474
return
7575
end
76-
if self.on_close then
77-
self.on_close(self, opts)
78-
end
7976
if is_modified then
8077
local choice =
8178
vim.fn.confirm(string.format('Do you want to refile this to %s?', opts.destination_file.filename), '&Yes\n&No')
@@ -167,6 +164,9 @@ function Capture:_refile_from_capture_buffer(opts)
167164
end)
168165
:wait()
169166

167+
if self.on_close then
168+
self.on_close(self, opts)
169+
end
170170
utils.echo_info(('Wrote %s'):format(destination_file.filename))
171171
self:kill()
172172
return true

0 commit comments

Comments
 (0)