mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 9.0.1921: not possible to use the jumplist like a stack
Problem: not possible to use the jumplist like a stack Solution: Add the 'jumpoptions' setting to make the jumplist a stack. Add an option for using jumplist like tag stack related: #7738 closes: #13134 ported from NeoVim: - https://neovim.io/doc/user/motion.html#jumplist-stack - neovim/neovim@39094b3 - neovim/neovim#11530 - https://vi.stackexchange.com/questions/18344/how-to-change-jumplist-behavior Based on the feedback in the previous PR, it looks like many people like this option. Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com> Co-authored-by: butwerenotthereyet <58348703+butwerenotthereyet@users.noreply.github.com>
This commit is contained in:
committed by
Christian Brabandt
parent
98e68c07ce
commit
87018255e3
@@ -35,6 +35,7 @@ static char *(p_cm_values[]) = {"zip", "blowfish", "blowfish2",
|
||||
#endif
|
||||
static char *(p_cmp_values[]) = {"internal", "keepascii", NULL};
|
||||
static char *(p_dy_values[]) = {"lastline", "truncate", "uhex", NULL};
|
||||
static char *(p_jop_values[]) = {"stack", NULL};
|
||||
#ifdef FEAT_FOLDING
|
||||
static char *(p_fdo_values[]) = {"all", "block", "hor", "mark", "percent",
|
||||
"quickfix", "search", "tag", "insert",
|
||||
@@ -120,6 +121,7 @@ didset_string_options(void)
|
||||
(void)opt_strings_flags(p_fdo, p_fdo_values, &fdo_flags, TRUE);
|
||||
#endif
|
||||
(void)opt_strings_flags(p_dy, p_dy_values, &dy_flags, TRUE);
|
||||
(void)opt_strings_flags(p_jop, p_jop_values, &jop_flags, TRUE);
|
||||
(void)opt_strings_flags(p_tc, p_tc_values, &tc_flags, FALSE);
|
||||
(void)opt_strings_flags(p_ve, p_ve_values, &ve_flags, TRUE);
|
||||
#if defined(UNIX) || defined(VMS)
|
||||
@@ -1852,6 +1854,18 @@ did_set_isopt(optset_T *args)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* The 'jumpoptions' option is changed.
|
||||
*/
|
||||
char *
|
||||
did_set_jumpoptions(optset_T *args)
|
||||
{
|
||||
if (opt_strings_flags(p_jop, p_jop_values, &jop_flags, TRUE) != OK)
|
||||
return e_invalid_argument;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if defined(FEAT_KEYMAP) || defined(PROTO)
|
||||
/*
|
||||
* The 'keymap' option is changed.
|
||||
|
Reference in New Issue
Block a user