Patch 8.2.0637
Problem:    Incsearch highlighting does not work for ":sort!".
Solution:   Skip over the exclamation point. (closes #5983)
Files:      src/ex_getln.c, src/testdir/test_search.vim,
            src/testdir/dumps/Test_incsearch_sort_02.dump


*** ../vim-8.2.0636/src/ex_getln.c      2020-04-21 22:01:11.089499502 +0200
--- src/ex_getln.c      2020-04-25 15:48:18.499567387 +0200
***************
*** 249,255 ****
      }
      else if (STRNCMP(cmd, "sort", MAX(p - cmd, 3)) == 0)
      {
!       // skip over flags
        while (ASCII_ISALPHA(*(p = skipwhite(p))))
            ++p;
        if (*p == NUL)
--- 249,257 ----
      }
      else if (STRNCMP(cmd, "sort", MAX(p - cmd, 3)) == 0)
      {
!       // skip over ! and flags
!       if (*p == '!')
!           p = skipwhite(p + 1);
        while (ASCII_ISALPHA(*(p = skipwhite(p))))
            ++p;
        if (*p == NUL)
*** ../vim-8.2.0636/src/testdir/test_search.vim 2020-04-23 13:37:59.494978699 
+0200
--- src/testdir/test_search.vim 2020-04-25 15:51:00.395131558 +0200
***************
*** 1136,1146 ****
    " the 'ambiwidth' check.
    sleep 100m
  
-   " Need to send one key at a time to force a redraw.
    call term_sendkeys(buf, ':sort ni u /on')
    call VerifyScreenDump(buf, 'Test_incsearch_sort_01', {})
    call term_sendkeys(buf, "\<Esc>")
  
    call StopVimInTerminal(buf)
    call delete('Xis_sort_script')
  endfunc
--- 1136,1149 ----
    " the 'ambiwidth' check.
    sleep 100m
  
    call term_sendkeys(buf, ':sort ni u /on')
    call VerifyScreenDump(buf, 'Test_incsearch_sort_01', {})
    call term_sendkeys(buf, "\<Esc>")
  
+   call term_sendkeys(buf, ':sort! /on')
+   call VerifyScreenDump(buf, 'Test_incsearch_sort_02', {})
+   call term_sendkeys(buf, "\<Esc>")
+ 
    call StopVimInTerminal(buf)
    call delete('Xis_sort_script')
  endfunc
*** ../vim-8.2.0636/src/testdir/dumps/Test_incsearch_sort_02.dump       
2020-04-25 15:53:53.510679926 +0200
--- src/testdir/dumps/Test_incsearch_sort_02.dump       2020-04-25 
15:52:52.726837099 +0200
***************
*** 0 ****
--- 1,9 ----
+ |a+0&#ffffff0|n|o|t|h|e|r| |o+1&&|n|e+0&&| |2| @56
+ |t|h|a|t| |o+0&#ffff4012|n|e+0&#ffffff0| |3| @59
+ |t|h|e| |o+0&#ffff4012|n|e+0&#ffffff0| |1| @60
+ |~+0#4040ff13&| @68
+ |~| @68
+ |~| @68
+ |~| @68
+ |~| @68
+ |:+0#0000000&|s|o|r|t|!| |/|o|n> @59
*** ../vim-8.2.0636/src/version.c       2020-04-25 15:45:34.480027272 +0200
--- src/version.c       2020-04-25 15:52:42.090864744 +0200
***************
*** 748,749 ****
--- 748,751 ----
  {   /* Add new patch number below this line */
+ /**/
+     637,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
15. Your heart races faster and beats irregularly each time you see a new WWW
    site address in print or on TV, even though you've never had heart
    problems before.

 /// 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/202004251354.03PDsgAZ032256%40masaka.moolenaar.net.

Raspunde prin e-mail lui