We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 220f7f0 commit 605a50aCopy full SHA for 605a50a
lua/orgmode/org/mappings.lua
@@ -50,7 +50,10 @@ function OrgMappings:archive()
50
archive_location,
51
vim.schedule_wrap(function()
52
Files.update_file(archive_location, function(archive_file)
53
- local last_item = archive_file:get_closest_headline(vim.fn.line('$'))
+ -- Jump to last headline in archive file
54
+ vim.cmd('normal! G')
55
+ vim.fn.search([[^\*\+\s\+]], 'b')
56
+ local last_item = archive_file:get_closest_headline()
57
if not last_item then
58
return
59
end
0 commit comments