Patch 7.4.147
Problem:    Cursor moves to wrong position when using "gj" after "$" and
            virtual editing is active.
Solution:   Make "gj" behave differently when virtual editing is active.
            (Hirohito Higashi)
Files:      src/normal.c, src/testdir/test39.in, src/testdir/test39.ok


*** ../vim-7.4.146/src/normal.c 2013-12-11 14:54:58.000000000 +0100
--- src/normal.c        2014-01-14 13:13:30.000000000 +0100
***************
*** 4644,4650 ****
      }
  #endif
  
!     coladvance(curwin->w_curswant);
  
  #if defined(FEAT_LINEBREAK) || defined(FEAT_MBYTE)
      if (curwin->w_cursor.col > 0 && curwin->w_p_wrap)
--- 4644,4653 ----
      }
  #endif
  
!     if (virtual_active() && atend)
!       coladvance(MAXCOL);
!     else
!       coladvance(curwin->w_curswant);
  
  #if defined(FEAT_LINEBREAK) || defined(FEAT_MBYTE)
      if (curwin->w_cursor.col > 0 && curwin->w_p_wrap)
*** ../vim-7.4.146/src/testdir/test39.in        2013-11-21 14:39:58.000000000 
+0100
--- src/testdir/test39.in       2014-01-14 13:12:34.000000000 +0100
***************
*** 52,57 ****
--- 52,63 ----
  G3o123456789 2k05l 2jr
G3o98765 2k02l 2jr 
  G3o123456789 2k05l 2jr
  G3o98765 2k02l 2jr 
+ :"
+ :" Test cursor position. When ve=block and Visual block mode and $gj
+ :set ve=block
+ :exe ":norm! 2k\<C-V>$gj\<Esc>"
+ :let cpos=getpos("'>")
+ :$put ='col:'.cpos[2].' off:'.cpos[3]
  :/^the/,$w >> test.out
  :qa!
  ENDTEST
*** ../vim-7.4.146/src/testdir/test39.ok        2013-11-21 14:39:58.000000000 
+0100
--- src/testdir/test39.ok       2014-01-14 13:12:46.000000000 +0100
***************
*** 43,45 ****
--- 43,46 ----
  98

-- 
-- 
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/groups/opt_out.

Raspunde prin e-mail lui