[vim/vim] Add support for truncating the tag stack (#5417)

22 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Dec 30, 2019, 1:23:31 AM12/30/19
to vim/vim, Subscribed

You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/5417

Commit Summary

  • Add support for truncating the tagstack

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Codecov

unread,
Dec 30, 2019, 1:43:59 AM12/30/19
to vim/vim, Subscribed

Codecov Report

Merging #5417 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@

##           master    #5417      +/-   ##

==========================================

+ Coverage   82.69%   82.69%   +<.01%     

==========================================

  Files         134      134              

  Lines      147652   147661       +9     

==========================================

+ Hits       122099   122111      +12     

+ Misses      25553    25550       -3
Impacted Files Coverage Δ
src/evalfunc.c 91.87% <100%> (ø) ⬆️
src/tag.c 79.38% <100%> (+0.09%) ⬆️
src/channel.c 84.22% <0%> (-0.08%) ⬇️
src/message.c 86.38% <0%> (-0.05%) ⬇️
src/window.c 88.3% <0%> (-0.04%) ⬇️
src/gui.c 63.63% <0%> (+0.05%) ⬆️
src/gui_gtk_x11.c 58.06% <0%> (+0.09%) ⬆️
src/if_xcmdsrv.c 86.35% <0%> (+0.71%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eb698d0...8b7c2d6. Read the comment docs.

Bram Moolenaar

unread,
Dec 31, 2019, 1:26:21 PM12/31/19
to vim/vim, Subscribed

Yegappan wrote:

> * Add support for truncating the tagstack

It looks like the "curidx" is set after truncating the stack. I would
find it more logical to first set the current index and then truncate
and append the new items. The test actually uses two calls to
settagstack(), I would think that's an indication that this is the
desired behavior.

--
CRONE: Who sent you?
ARTHUR: The Knights Who Say Ni!
CRONE: Aaaagh! (she looks around in rear) No! We have no shrubberies here.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Yegappan Lakshmanan

unread,
Dec 31, 2019, 7:24:16 PM12/31/19
to vim/vim, Push

@yegappan pushed 1 commit.

  • cfbb906 set the current index in the tag stack before truncating the stack and pushing new items


You are receiving this because you are subscribed to this thread.

View it on GitHub or unsubscribe.

Yegappan Lakshmanan

unread,
Dec 31, 2019, 7:30:40 PM12/31/19
to vim_dev, reply+ACY5DGEPMCEMB3IV6A...@reply.github.com, vim/vim, Subscribed
Hi Bram,

Happy new year.

On Tue, Dec 31, 2019 at 11:56 PM Bram Moolenaar <vim-dev...@256bit.org> wrote:

Yegappan wrote:

> * Add support for truncating the tagstack

It looks like the "curidx" is set after truncating the stack. I would
find it more logical to first set the current index and then truncate
and append the new items. The test actually uses two calls to
settagstack(), I would think that's an indication that this is the
desired behavior.


I have updated the PR with this change.

Regards,
Yegappan 

vim-dev ML

unread,
Dec 31, 2019, 7:30:46 PM12/31/19
to vim/vim, vim-dev ML, Your activity

Bram Moolenaar

unread,
Jan 1, 2020, 1:43:06 PM1/1/20
to vim/vim, vim-dev ML, Comment

Yegappan wrote:

> > > * Add support for truncating the tagstack
> >
> > It looks like the "curidx" is set after truncating the stack. I would
> > find it more logical to first set the current index and then truncate
> > and append the new items. The test actually uses two calls to
> > settagstack(), I would think that's an indication that this is the
> > desired behavior.
> >
> >
> I have updated the PR with this change.

Thanks. I think this help is now outdated:

+ The current index is set to one after the length of the tag
+ stack. This can be changed by using 'curidx' in {dict}.

It is normal that after adding entries to the stack the index is set to
the end. So now the index is set before truncating. Please describe
this, it's not that easy to understand.

--
TALL KNIGHT: We are now no longer the Knights Who Say Ni!
ONE KNIGHT: Ni!
OTHERS: Sh!
ONE KNIGHT: (whispers) Sorry.

"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


You are receiving this because you commented.

Yegappan Lakshmanan

unread,
Jan 1, 2020, 6:24:15 PM1/1/20
to vim/vim, vim-dev ML, Push

@yegappan pushed 1 commit.


You are receiving this because you are subscribed to this thread.

Bram Moolenaar

unread,
Jan 2, 2020, 8:02:33 AM1/2/20
to vim/vim, vim-dev ML, Comment

Closed #5417 via 271fa08.


You are receiving this because you commented.

Reply all
Reply to author
Forward
0 new messages