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

Problem:  Cannot opt out of removing unloaded buffers from the jumplist.
Solution: Only enable that with "clean" flag in 'jumpoptions'.
This commit is contained in:
zeertzjq
2024-09-19 18:32:50 +08:00
committed by GitHub
parent 017a054e82
commit a3f9bd7f79
9 changed files with 92 additions and 22 deletions

View File

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