diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-10-26 12:53:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-26 12:53:45 +0800 |
commit | ec33edc7b7027b809ac0b496344367a451e3974a (patch) | |
tree | 7519fdbc30189dc7b0c3e2e7913ab0ac9bb1bf0a /src/nvim/tag.c | |
parent | 40791f8e8239dcb4dda1c4d61e2aa9088e75bb17 (diff) | |
parent | 0aaef07224eb4243c944765cfc6692b08cbe8750 (diff) | |
download | rneovim-ec33edc7b7027b809ac0b496344367a451e3974a.tar.gz rneovim-ec33edc7b7027b809ac0b496344367a451e3974a.tar.bz2 rneovim-ec33edc7b7027b809ac0b496344367a451e3974a.zip |
Merge pull request #20803 from zeertzjq/vim-8.2.0179
vim-patch:8.2.{0179,0211}: tests for range()
Diffstat (limited to 'src/nvim/tag.c')
-rw-r--r-- | src/nvim/tag.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/tag.c b/src/nvim/tag.c index 8c0c2e8f57..90b21320d2 100644 --- a/src/nvim/tag.c +++ b/src/nvim/tag.c @@ -3289,10 +3289,12 @@ int set_tagstack(win_T *wp, const dict_T *d, int action) if ((di = tv_dict_find(d, "curidx", -1)) != NULL) { tagstack_set_curidx(wp, (int)tv_get_number(&di->di_tv) - 1); } + if (action == 't') { // truncate the stack taggy_T *const tagstack = wp->w_tagstack; const int tagstackidx = wp->w_tagstackidx; int tagstacklen = wp->w_tagstacklen; + // delete all the tag stack entries above the current entry while (tagstackidx < tagstacklen) { tagstack_clear_entry(&tagstack[--tagstacklen]); |