86 lines
2.5 KiB
Plaintext
86 lines
2.5 KiB
Plaintext
To: vim_dev@googlegroups.com
|
||
Subject: Patch 7.4.147
|
||
Fcc: outbox
|
||
From: Bram Moolenaar <Bram@moolenaar.net>
|
||
Mime-Version: 1.0
|
||
Content-Type: text/plain; charset=UTF-8
|
||
Content-Transfer-Encoding: 8bit
|
||
------------
|
||
|
||
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 ----
|
||
G3o1234567892k05l2jr
|
||
G3o987652k02l2jr
|
||
G3o1234567892k05l2jr
|
||
G3o987652k02l2jr
|
||
+ :"
|
||
+ :" 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 |