Patch 8.1.1965
Problem:    The search count message is not displayed when using a mapping.
            (Gary Johnson)
Solution:   Ignore cmd_silent for showing the search count. (Christian
            Brabandt)
Files:      src/search.c


*** ../vim-8.1.1964/src/search.c        2019-08-21 14:36:29.391376081 +0200
--- src/search.c        2019-09-02 21:39:14.374962320 +0200
***************
*** 1351,1358 ****
            pat = p;                        /* put pat after search command */
        }
  
!       if ((options & SEARCH_ECHO) && messaging()
!                                           && !cmd_silent && msg_silent == 0)
        {
            char_u      *trunc;
            char_u      off_buf[40];
--- 1351,1359 ----
            pat = p;                        /* put pat after search command */
        }
  
!       if ((options & SEARCH_ECHO) && messaging() &&
!               !msg_silent &&
!               (!cmd_silent || !shortmess(SHM_SEARCHCOUNT)))
        {
            char_u      *trunc;
            char_u      off_buf[40];
***************
*** 1362,1368 ****
            msg_start();
  
            // Get the offset, so we know how long it is.
!           if (spats[0].off.line || spats[0].off.end || spats[0].off.off)
            {
                p = off_buf;
                *p++ = dirc;
--- 1363,1370 ----
            msg_start();
  
            // Get the offset, so we know how long it is.
!           if (!cmd_silent &&
!                   (spats[0].off.line || spats[0].off.end || spats[0].off.off))
            {
                p = off_buf;
                *p++ = dirc;
***************
*** 1383,1395 ****
            else
                p = searchstr;
  
!           if (!shortmess(SHM_SEARCHCOUNT))
            {
                // Reserve enough space for the search pattern + offset +
                // search stat.  Use all the space available, so that the
                // search state is right aligned.  If there is not enough space
                // msg_strtrunc() will shorten in the middle.
!               if (msg_scrolled != 0)
                    // Use all the columns.
                    len = (int)(Rows - msg_row) * Columns - 1;
                else
--- 1385,1397 ----
            else
                p = searchstr;
  
!           if (!shortmess(SHM_SEARCHCOUNT) || cmd_silent)
            {
                // Reserve enough space for the search pattern + offset +
                // search stat.  Use all the space available, so that the
                // search state is right aligned.  If there is not enough space
                // msg_strtrunc() will shorten in the middle.
!               if (msg_scrolled != 0 || cmd_silent)
                    // Use all the columns.
                    len = (int)(Rows - msg_row) * Columns - 1;
                else
***************
*** 1406,1467 ****
            if (msgbuf != NULL)
            {
                vim_memset(msgbuf, ' ', len);
-               msgbuf[0] = dirc;
                msgbuf[len - 1] = NUL;
! 
!               if (enc_utf8 && utf_iscomposing(utf_ptr2char(p)))
                {
!                   // Use a space to draw the composing char on.
!                   msgbuf[1] = ' ';
!                   mch_memmove(msgbuf + 2, p, STRLEN(p));
!               }
!               else
!                   mch_memmove(msgbuf + 1, p, STRLEN(p));
!               if (off_len > 0)
!                   mch_memmove(msgbuf + STRLEN(p) + 1, off_buf, off_len);
  
!               trunc = msg_strtrunc(msgbuf, TRUE);
!               if (trunc != NULL)
!               {
!                   vim_free(msgbuf);
!                   msgbuf = trunc;
!               }
! 
! #ifdef FEAT_RIGHTLEFT
!               // The search pattern could be shown on the right in rightleft
!               // mode, but the 'ruler' and 'showcmd' area use it too, thus
!               // it would be blanked out again very soon.  Show it on the
!               // left, but do reverse the text.
!               if (curwin->w_p_rl && *curwin->w_p_rlc == 's')
!               {
!                   char_u *r;
!                   size_t pat_len;
  
!                   r = reverse_text(msgbuf);
!                   if (r != NULL)
                    {
                        vim_free(msgbuf);
!                       msgbuf = r;
!                       // move reversed text to beginning of buffer
!                       while (*r != NUL && *r == ' ')
!                           r++;
!                       pat_len = msgbuf + STRLEN(msgbuf) - r;
!                       mch_memmove(msgbuf, r, pat_len);
!                       // overwrite old text
!                       if ((size_t)(r - msgbuf) >= pat_len)
!                           vim_memset(r, ' ', pat_len);
!                       else
!                           vim_memset(msgbuf + pat_len, ' ', r - msgbuf);
                    }
                }
- #endif
-               msg_outtrans(msgbuf);
-               msg_clr_eos();
-               msg_check();
- 
-               gotocmdline(FALSE);
-               out_flush();
-               msg_nowait = TRUE;          // don't wait for this message
            }
        }
  
--- 1408,1474 ----
            if (msgbuf != NULL)
            {
                vim_memset(msgbuf, ' ', len);
                msgbuf[len - 1] = NUL;
!               // do not fill the msgbuf buffer, if cmd_silent is set, leave it
!               // empty for the search_stat feature.
!               if (!cmd_silent)
                {
!                   msgbuf[0] = dirc;
  
!                   if (enc_utf8 && utf_iscomposing(utf_ptr2char(p)))
!                   {
!                       // Use a space to draw the composing char on.
!                       msgbuf[1] = ' ';
!                       mch_memmove(msgbuf + 2, p, STRLEN(p));
!                   }
!                   else
!                       mch_memmove(msgbuf + 1, p, STRLEN(p));
!                   if (off_len > 0)
!                       mch_memmove(msgbuf + STRLEN(p) + 1, off_buf, off_len);
  
!                   trunc = msg_strtrunc(msgbuf, TRUE);
!                   if (trunc != NULL)
                    {
                        vim_free(msgbuf);
!                       msgbuf = trunc;
!                   }
! 
!     #ifdef FEAT_RIGHTLEFT
!                   // The search pattern could be shown on the right in 
rightleft
!                   // mode, but the 'ruler' and 'showcmd' area use it too, thus
!                   // it would be blanked out again very soon.  Show it on the
!                   // left, but do reverse the text.
!                   if (curwin->w_p_rl && *curwin->w_p_rlc == 's')
!                   {
!                       char_u *r;
!                       size_t pat_len;
! 
!                       r = reverse_text(msgbuf);
!                       if (r != NULL)
!                       {
!                           vim_free(msgbuf);
!                           msgbuf = r;
!                           // move reversed text to beginning of buffer
!                           while (*r != NUL && *r == ' ')
!                               r++;
!                           pat_len = msgbuf + STRLEN(msgbuf) - r;
!                           mch_memmove(msgbuf, r, pat_len);
!                           // overwrite old text
!                           if ((size_t)(r - msgbuf) >= pat_len)
!                               vim_memset(r, ' ', pat_len);
!                           else
!                               vim_memset(msgbuf + pat_len, ' ', r - msgbuf);
!                       }
                    }
+     #endif
+                   msg_outtrans(msgbuf);
+                   msg_clr_eos();
+                   msg_check();
+ 
+                   gotocmdline(FALSE);
+                   out_flush();
+                   msg_nowait = TRUE;      // don't wait for this message
                }
            }
        }
  
***************
*** 1569,1575 ****
        // Show [1/15] if 'S' is not in 'shortmess'.
        if ((options & SEARCH_ECHO)
                && messaging()
!               && !(cmd_silent + msg_silent)
                && c != FAIL
                && !shortmess(SHM_SEARCHCOUNT)
                && msgbuf != NULL)
--- 1576,1582 ----
        // Show [1/15] if 'S' is not in 'shortmess'.
        if ((options & SEARCH_ECHO)
                && messaging()
!               && !msg_silent
                && c != FAIL
                && !shortmess(SHM_SEARCHCOUNT)
                && msgbuf != NULL)
*** ../vim-8.1.1964/src/version.c       2019-09-02 20:44:02.688728142 +0200
--- src/version.c       2019-09-02 21:43:08.518509371 +0200
***************
*** 763,764 ****
--- 763,766 ----
  {   /* Add new patch number below this line */
+ /**/
+     1965,
  /**/

-- 
"Hit any key to continue" it said, but nothing happened after F sharp.

 /// Bram Moolenaar -- [email protected] -- 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_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/201909021945.x82JjHpn019224%40masaka.moolenaar.net.

Raspunde prin e-mail lui