Skip to content

Commit 72a7a62

Browse files
Use nvim_buf_set_lines when deleting refiled content
1 parent fc8e376 commit 72a7a62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/orgmode/capture/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ function Capture:_refile_to(file, lines, item, destination_line)
275275
end
276276

277277
if item and item.file == utils.current_file_path() then
278-
vim.cmd(string.format('silent! %d,%d delete', item.range.start_line, item.range.end_line))
278+
vim.api.nvim_buf_set_lines(0, item.range.start_line - 1, item.range.end_line, false, {})
279279
end
280280

281281
return true

0 commit comments

Comments
 (0)