feat(jumplist): allow opting out of removing unloaded buffers (#29347)

Problem:  Cannot opt out of removing unloaded buffers from the jumplist.
Solution: Only enable that with "unload" flag in 'jumpoptions'.
This commit is contained in:
zeertzjq
2024-06-30 06:40:31 +08:00
committed by GitHub
parent 435d0182d2
commit e7020306a1
9 changed files with 92 additions and 22 deletions

View File

@@ -3551,8 +3551,11 @@ vim.go.js = vim.go.joinspaces
--- |alternate-file` or using `mark-motions` try to
--- restore the `mark-view` in which the action occurred.
---
--- unload Remove unloaded buffers from the jumplist.
--- EXPERIMENTAL: this flag may change in the future.
---
--- @type string
vim.o.jumpoptions = ""
vim.o.jumpoptions = "unload"
vim.o.jop = vim.o.jumpoptions
vim.go.jumpoptions = vim.o.jumpoptions
vim.go.jop = vim.go.jumpoptions