Patch 8.2.1823
Problem:    "gN" does not select the matched string.
Solution:   Move the cursor to the start of the match.
Files:      src/search.c, src/testdir/test_gn.vim


*** ../vim-8.2.1822/src/search.c        2020-10-02 20:35:56.125323766 +0200
--- src/search.c        2020-10-10 16:25:52.954594310 +0200
***************
*** 3047,3053 ****
      curwin->w_cursor = end_pos;
      if (LT_POS(VIsual, end_pos) && forward)
        dec_cursor();
!     else if (VIsual_active && LT_POS(curwin->w_cursor, VIsual))
        curwin->w_cursor = pos;   // put the cursor on the start of the match
      VIsual_active = TRUE;
      VIsual_mode = 'v';
--- 3047,3053 ----
      curwin->w_cursor = end_pos;
      if (LT_POS(VIsual, end_pos) && forward)
        dec_cursor();
!     else if (VIsual_active && LT_POS(curwin->w_cursor, VIsual) && forward)
        curwin->w_cursor = pos;   // put the cursor on the start of the match
      VIsual_active = TRUE;
      VIsual_mode = 'v';
*** ../vim-8.2.1822/src/testdir/test_gn.vim     2020-07-30 20:08:46.836890228 
+0200
--- src/testdir/test_gn.vim     2020-10-10 16:15:54.264205329 +0200
***************
*** 172,178 ****
    normal 0wgNy
    call assert_equal('one', @")
    set selection&
! endfu
  
  func Test_gn_multi_line()
    new
--- 172,187 ----
    normal 0wgNy
    call assert_equal('one', @")
    set selection&
! endfunc
! 
! func Test_gN_repeat()
!   new
!   call setline(1, 'this list is a list with a list of a list.')
!   /list
!   normal $gNgNgNx
!   call assert_equal('list with a list of a list', @")
!   bwipe!
! endfunc
  
  func Test_gn_multi_line()
    new
*** ../vim-8.2.1822/src/version.c       2020-10-10 16:42:36.379910364 +0200
--- src/version.c       2020-10-10 16:44:16.595641312 +0200
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     1823,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
56. You leave the modem speaker on after connecting because you think it
    sounds like the ocean wind...the perfect soundtrack for "surfing the net".

 /// 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/202010101445.09AEjo5D3743429%40masaka.moolenaar.net.

Raspunde prin e-mail lui