On Nov 5, 2013 4:29 PM, "zhaocai" <[email protected]> wrote: > > Slight change to the patch to avoid “pointer type mismatch warning” > > > > From 8c376bdb5e6d22ab56044bd07f4f631eaa40855d Mon Sep 17 00:00:00 2001 > From: Zhao Cai <[email protected]> > Date: Sun, 27 Oct 2013 22:05:23 -0400 > Subject: [PATCH] Disable "Pattern not found" message unless verbose > 0 > > --- > src/edit.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/edit.c b/src/edit.c > index 88a82ed..30f88fa 100644 > --- a/src/edit.c > +++ b/src/edit.c > @@ -5462,7 +5462,8 @@ ins_complete(c) > { > edit_submode_extra = (compl_cont_status & CONT_ADDING) > && compl_length > 1 > - ? (char_u *)_(e_hitend) : (char_u *)_(e_patnotf); > + ? (char_u *)_(e_hitend) : > + ( (p_verbose != 0) ? (char_u *)_(e_patnotf) : (char_u *)_(“"));
(char_u *)_(“") is *translated* empty string casted to unsigned char. What do you need translation of an empty string for? I am against this patch though as I do want to receive these messages. This should be fixed by adding appropriate flag (such as s//e) to whatever method that is giving these messages if you are sure there are no ways to use other methods (e.g. :silent). Links you gave does not show the code which is giving these messages, and without them discussion of proper ways to fix the problem is pointless. The fact that YCM upstream said it is a vim bug does not actually make this a vim bug. By the way, FAQ you referenced talks about "User defined completion <bla bla> back at original" messages and you are silencing "Pattern not found" ones. I do not understand why. > edit_submode_highl = HLF_E; > /* remove N_ADDS flag, so next ^X<> won't try to go to ADDING mode, > * because we couldn't expand anything at first place, but if we used > — > > > On Nov 4, 2013, at 16:33, zhaocai <[email protected]> wrote: > >> ## Reason >> >> It is quite annoying when you use auto-completion plugins like YouCompleteMe or neocomplete. >> >> ## Related Discussion: >> - https://github.com/Valloric/YouCompleteMe/issues/642#issuecomment-27711342 >> - https://github.com/Valloric/YouCompleteMe#i-get-annoying-messages-in-vims-status-area-when-i-type >> >> >> From 8c376bdb5e6d22ab56044bd07f4f631eaa40855d Mon Sep 17 00:00:00 2001 >> From: Zhao Cai <[email protected]> >> Date: Sun, 27 Oct 2013 22:05:23 -0400 >> Subject: [PATCH] Disable "Pattern not found" message unless verbose > 0 >> >> --- >> src/edit.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/src/edit.c b/src/edit.c >> index 88a82ed..30f88fa 100644 >> --- a/src/edit.c >> +++ b/src/edit.c >> @@ -5462,7 +5462,8 @@ ins_complete(c) >> { >> edit_submode_extra = (compl_cont_status & CONT_ADDING) >> && compl_length > 1 >> - ? (char_u *)_(e_hitend) : (char_u *)_(e_patnotf); >> + ? (char_u *)_(e_hitend) : >> + ( (p_verbose != 0) ? (char_u *)_(e_patnotf) : ""); >> edit_submode_highl = HLF_E; >> /* remove N_ADDS flag, so next ^X<> won't try to go to ADDING mode, >> * because we couldn't expand anything at first place, but if we used >> -- >> >> >> -- >> -- >> You received this message from the "vim_dev" 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_dev" group. >> To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. > > > -- > -- > You received this message from the "vim_dev" 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_dev" group. > To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message from the "vim_dev" 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_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
