Friday, August 30, 2019

Re: Mapping erases search count message

Christian wrote:

> On Do, 29 Aug 2019, Bram Moolenaar wrote:
>
> > The <silent> argument means that the command won't be echoed. But it
> > does not suppress the output of the command like the ":silent" modifier
> > does.
>
> Yeah, but it felt natural to me, to only show the search index feature,
> if the command is echoed. I actually played with a simple patch
> yesterday, but then thought that <silent> works as expected.
>
> > How about removing the check for cmd_silent in search.c, where
> > search_stat() is called?
>
> It's a bit more convoluted, since msgbuf needs to be properly allocated
> and initialized.
>
> The attached patch does it. Let me know if you think that is okay. I can
> write a test then.

Thanks. Yes, I think we should do this. But the allocation should
probably be done differently, it looks like with cmd_silent set it still
computes the size of the command. This will require some more "if"
statements, but makes the size computation more accurate.

--
Birthdays are healthy. The more you have them, the longer you live.

/// Bram Moolenaar -- Bram@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 received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/201908301112.x7UBCrnm004785%40masaka.moolenaar.net.

No comments: