vim-patch:9.1.1283: quickfix stack is limited to 10 items

Problem:  quickfix and location-list stack is limited to 10 items
Solution: add the 'chistory' and 'lhistory' options to configure a
          larger quickfix/location list stack
          (64-bitman)

closes: vim/vim#16920

88d41ab270

Co-authored-by: 64-bitman <60551350+64-bitman@users.noreply.github.com>
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
This commit is contained in:
zeertzjq
2025-04-08 11:11:38 +08:00
parent 36d143e707
commit 00eff4b196
14 changed files with 525 additions and 61 deletions

View File

@@ -1122,6 +1122,25 @@ local options = {
tags = { 'E202', 'E214', 'E513' },
varname = 'p_ccv',
},
{
abbreviation = 'chi',
cb = 'did_set_xhistory',
defaults = 10,
desc = [=[
Number of quickfix lists that should be remembered for the quickfix
stack. Must be between 1 and 100. If the option is set to a value
that is lower than the amount of entries in the quickfix list stack,
entries will be removed starting from the oldest one. If the current
quickfix list was removed, then the quickfix list at top of the stack
(the most recently created) will be used in its place. For additional
info, see |quickfix-stack|.
]=],
full_name = 'chistory',
scope = { 'global' },
short_desc = N_('number of quickfix lists stored in history'),
type = 'number',
varname = 'p_chi',
},
{
abbreviation = 'cin',
defaults = false,
@@ -5022,6 +5041,24 @@ local options = {
type = 'boolean',
varname = 'p_lz',
},
{
abbreviation = 'lhi',
cb = 'did_set_xhistory',
defaults = 10,
desc = [=[
Like 'chistory', but for the location list stack associated with the
current window. If the option is changed in either the location list
window itself or the the window that is associated with the location
list stack, the new value will also be applied to the other one. This
means this value will always be the same for a given location list
window and its corresponding window. See |quickfix-stack| for
additional info.
]=],
full_name = 'lhistory',
scope = { 'win' },
short_desc = N_('number of location lists stored in history'),
type = 'number',
},
{
abbreviation = 'lbr',
defaults = false,