Patch 9.0.0738
Problem:    Cannot suppress completion "scanning" messages.
Solution:   Add the "C" flag in 'shortmess'. (Bjorn Linse, closes #11354)
Files:      runtime/doc/options.txt, src/insexpand.c, src/option.h


*** ../vim-9.0.0737/runtime/doc/options.txt     2022-10-04 14:34:42.112964811 
+0100
--- runtime/doc/options.txt     2022-10-13 12:46:35.872343763 +0100
***************
*** 7050,7055 ****
--- 7079,7086 ----
          c     don't give |ins-completion-menu| messages.  For example,
                "-- XXX completion (YYY)", "match 1 of 2", "The only match",
                "Pattern not found", "Back at original", etc.
+         C     don't give messages while scanning for ins-completion items,
+               for instance "scanning tags"
          q     use "recording" instead of "recording @a"
          F     don't give the file info when editing a file, like `:silent`
                was used for the command; note that this also affects messages
*** ../vim-9.0.0737/src/insexpand.c     2022-10-04 16:23:39.018042176 +0100
--- src/insexpand.c     2022-10-13 12:48:36.260276742 +0100
***************
*** 1573,1579 ****
      for (i = 0; i < count && !got_int && !compl_interrupted; i++)
      {
        fp = mch_fopen((char *)files[i], "r");  // open dictionary file
!       if (flags != DICT_EXACT)
        {
            msg_hist_off = TRUE;        // reset in msg_trunc_attr()
            vim_snprintf((char *)IObuff, IOSIZE,
--- 1573,1579 ----
      for (i = 0; i < count && !got_int && !compl_interrupted; i++)
      {
        fp = mch_fopen((char *)files[i], "r");  // open dictionary file
!       if (flags != DICT_EXACT && !shortmess(SHM_COMPLETIONSCAN))
        {
            msg_hist_off = TRUE;        // reset in msg_trunc_attr()
            vim_snprintf((char *)IObuff, IOSIZE,
***************
*** 3281,3294 ****
            st->dict = st->ins_buf->b_fname;
            st->dict_f = DICT_EXACT;
        }
!       msg_hist_off = TRUE;    // reset in msg_trunc_attr()
!       vim_snprintf((char *)IObuff, IOSIZE, _("Scanning: %s"),
!               st->ins_buf->b_fname == NULL
!                   ? buf_spname(st->ins_buf)
!                   : st->ins_buf->b_sfname == NULL
!                       ? st->ins_buf->b_fname
!                       : st->ins_buf->b_sfname);
!       (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
      }
      else if (*st->e_cpt == NUL)
        status = INS_COMPL_CPT_END;
--- 3281,3297 ----
            st->dict = st->ins_buf->b_fname;
            st->dict_f = DICT_EXACT;
        }
!       if (!shortmess(SHM_COMPLETIONSCAN))
!       {
!           msg_hist_off = TRUE;        // reset in msg_trunc_attr()
!           vim_snprintf((char *)IObuff, IOSIZE, _("Scanning: %s"),
!                   st->ins_buf->b_fname == NULL
!                       ? buf_spname(st->ins_buf)
!                       : st->ins_buf->b_sfname == NULL
!                           ? st->ins_buf->b_fname
!                           : st->ins_buf->b_sfname);
!           (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
!       }
      }
      else if (*st->e_cpt == NUL)
        status = INS_COMPL_CPT_END;
***************
*** 3316,3325 ****
  #endif
        else if (*st->e_cpt == ']' || *st->e_cpt == 't')
        {
-           msg_hist_off = TRUE;        // reset in msg_trunc_attr()
            compl_type = CTRL_X_TAGS;
!           vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags."));
!           (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
        }
        else
            compl_type = -1;
--- 3319,3331 ----
  #endif
        else if (*st->e_cpt == ']' || *st->e_cpt == 't')
        {
            compl_type = CTRL_X_TAGS;
!           if (!shortmess(SHM_COMPLETIONSCAN))
!           {
!               msg_hist_off = TRUE;    // reset in msg_trunc_attr()
!               vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags."));
!               (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
!           }
        }
        else
            compl_type = -1;
*** ../vim-9.0.0737/src/option.h        2022-10-04 16:23:39.018042176 +0100
--- src/option.h        2022-10-13 12:44:10.120369110 +0100
***************
*** 265,275 ****
  #define SHM_ATTENTION 'A'             // no ATTENTION messages
  #define SHM_INTRO     'I'             // intro messages
  #define SHM_COMPLETIONMENU  'c'               // completion menu messages
  #define SHM_RECORDING 'q'             // short recording message
  #define SHM_FILEINFO  'F'             // no file info messages
  #define SHM_SEARCHCOUNT  'S'          // search stats: '[1/10]'
  #define SHM_POSIX       "AS"          // POSIX value
! #define SHM_ALL               "rmfixlnwaWtToOsAIcqFS" // all possible flags 
for 'shm'
  
  // characters for p_go:
  #define GO_TERMINAL   '!'             // use terminal for system commands
--- 265,276 ----
  #define SHM_ATTENTION 'A'             // no ATTENTION messages
  #define SHM_INTRO     'I'             // intro messages
  #define SHM_COMPLETIONMENU  'c'               // completion menu messages
+ #define SHM_COMPLETIONSCAN  'C'               // completion scanning messages
  #define SHM_RECORDING 'q'             // short recording message
  #define SHM_FILEINFO  'F'             // no file info messages
  #define SHM_SEARCHCOUNT  'S'          // search stats: '[1/10]'
  #define SHM_POSIX       "AS"          // POSIX value
! #define SHM_ALL               "rmfixlnwaWtToOsAIcCqFS" // all possible flags 
for 'shm'
  
  // characters for p_go:
  #define GO_TERMINAL   '!'             // use terminal for system commands
*** ../vim-9.0.0737/src/version.c       2022-10-13 12:29:34.233533860 +0100
--- src/version.c       2022-10-13 12:45:37.748362064 +0100
***************
*** 701,702 ****
--- 701,704 ----
  {   /* Add new patch number below this line */
+ /**/
+     738,
  /**/

-- 
Yesterday is history.
Tomorrow is a mystery.
Today is a gift.
That's why it is called 'present'.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20221013115138.B365B1C5298%40moolenaar.net.

Raspunde prin e-mail lui