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

@@ -4495,7 +4495,7 @@ return {
{
abbreviation = 'jop',
cb = 'did_set_jumpoptions',
defaults = { if_true = '' },
defaults = { if_true = 'unload' },
deny_duplicates = true,
desc = [=[
List of words that change the behavior of the |jumplist|.
@@ -4508,6 +4508,9 @@ return {
view When moving through the jumplist, |changelist|,
|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.
]=],
expand_cb = 'expand_set_jumpoptions',
full_name = 'jumpoptions',