Loading ...
Sorry, an error occurred while loading the content.

Re: [vim] Any idea to remove Omni 'Pattern not found' error message ?

Expand Messages
  • Christian Brabandt
    ... I am afraid, this needs a patch. Here is a patch and since :h CompleteDone explicitly mentions, it should also be triggered, when the completion was
    Message 1 of 1 , Feb 7, 2013
    • 0 Attachment
      On Thu, February 7, 2013 17:18, Jianjun Mao wrote:
      > hi,Christian, you are right, that's not a "problem"....
      > But it interrupts the CompleteDone event.
      > The background is that I am writing a plugin to parse and complete c/cpp
      > sourcesď(similar to clang_completeď)by using clang. When the
      > CompleteDone
      > event is triggered, it will show diagnostics window according to
      > the clang output.
      > If the completion result is not empty, omni will popup the result, then I
      > will choose what I want, finally show the diagnostics window, and all
      > things are OK. But when there is no pattern matched, the error message
      > stops plugin from showing diagnostics immediately...

      I am afraid, this needs a patch. Here is a patch and since :h
      CompleteDone explicitly mentions, it should also be triggered, when
      the completion was abandoned, this should be ok.

      diff -r 30b3b1da0350 src/edit.c
      --- a/src/edit.c Thu Jan 31 21:09:15 2013 +0100
      +++ b/src/edit.c Thu Feb 07 18:06:34 2013 +0100
      @@ -3846,6 +3846,12 @@
      #endif
      }
      }
      +#ifdef FEAT_AUTOCMD
      + else if (ctrl_x_mode == CTRL_X_LOCAL_MSG)
      + /* Trigger the CompleteDone event to give scripts a chance to act
      + * upon the completion. */
      + apply_autocmds(EVENT_COMPLETEDONE, NULL, NULL, FALSE, curbuf);
      +#endif

      /* reset continue_* if we left expansion-mode, if we stay they'll be
      * (re)set properly in ins_complete() */

      BTW: I didn't know, that when in Ctrl-X submode, one can use CTRL-X
      again to select a different completion mode. Is this documented
      somewhere or are we missing some documentation here?

      regards,
      Christian


      --
      --
      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 vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    Your message has been successfully submitted and would be delivered to recipients shortly.