Skip to content

Commit 8a71ef3

Browse files
Fix capture deleting lines in other buffer. Closes #326
1 parent 02d9799 commit 8a71ef3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/orgmode/capture/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ function Capture:_refile_to(file, lines, item, destination_line)
274274
vim.api.nvim_set_current_win(cur_win)
275275
end
276276

277-
if item then
277+
if item and item.file == utils.current_file_path() then
278278
vim.cmd(string.format('silent! %d,%d delete', item.range.start_line, item.range.end_line))
279279
end
280280

0 commit comments

Comments
 (0)