Patch 8.0.1765
Problem:    CTRL-G j in Insert mode is incorrect when 'virtualedit' is set.
Solution:   Take coladd into account. (Christian Brabandt, closes #2743)
Files:      src/charset.c, src/testdir/test_virtualedit.vim


*** ../vim-8.0.1764/src/charset.c       2018-03-29 16:03:46.616035925 +0200
--- src/charset.c       2018-04-25 21:59:10.012821767 +0200
***************
*** 1417,1423 ****
      colnr_T   vcol;
  
      curwin->w_p_list = FALSE;
!     getvcol(curwin, posp, NULL, &vcol, NULL);
      curwin->w_p_list = list_save;
      return vcol;
  }
--- 1417,1428 ----
      colnr_T   vcol;
  
      curwin->w_p_list = FALSE;
! #ifdef FEAT_VIRTUALEDIT
!     if (posp->coladd)
!       getvvcol(curwin, posp, NULL, &vcol, NULL);
!     else
! #endif
!       getvcol(curwin, posp, NULL, &vcol, NULL);
      curwin->w_p_list = list_save;
      return vcol;
  }
*** ../vim-8.0.1764/src/testdir/test_virtualedit.vim    2017-08-30 
17:01:31.746483683 +0200
--- src/testdir/test_virtualedit.vim    2018-04-25 21:58:46.724941892 +0200
***************
*** 41,43 ****
--- 41,61 ----
    bwipe!
    set virtualedit=
  endfunc
+ 
+ func Test_edit_CTRL_G()
+   new
+   set virtualedit=insert
+   call setline(1, ['123', '1', '12'])
+   exe "normal! ggA\<c-g>jx\<c-g>jx"
+   call assert_equal(['123', '1  x', '12 x'], getline(1,'$'))
+ 
+   set virtualedit=all
+   %d_
+   call setline(1, ['1', '12'])
+   exe "normal! ggllix\<c-g>jx"
+   call assert_equal(['1 x', '12x'], getline(1,'$'))
+ 
+ 
+   bwipe!
+   set virtualedit=
+ endfunc
*** ../vim-8.0.1764/src/version.c       2018-04-25 21:36:27.426594043 +0200
--- src/version.c       2018-04-25 22:01:12.336154813 +0200
***************
*** 763,764 ****
--- 763,766 ----
  {   /* Add new patch number below this line */
+ /**/
+     1765,
  /**/


-- 
    A KNIGHT rides into shot and hacks him to the ground.  He rides off.
    We stay for a moment on the glade.  A MIDDLE-AGED LADY in a C. & A.
    twin-set emerges from the trees and looks in horror at the body of her
    HUSBAND.
MRS HISTORIAN: FRANK!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// 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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui