Skip to content

Commit 99355e8

Browse files
committed
updated for version 7.4a.007
Problem: After "g$" with 'virtualedit' set, "k" moves to a different column. (Dimitar Dimitrov) Solution: Set w_curswant. (Christian Brabandt)
1 parent b7efeda commit 99355e8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/normal.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8220,6 +8220,11 @@ nv_g_cmd(cap)
82208220
i += ((curwin->w_virtcol - width1) / width2 + 1)
82218221
* width2;
82228222
coladvance((colnr_T)i);
8223+
8224+
/* Make sure we stick in this column. */
8225+
validate_virtcol();
8226+
curwin->w_curswant = curwin->w_virtcol;
8227+
curwin->w_set_curswant = FALSE;
82238228
#if defined(FEAT_LINEBREAK) || defined(FEAT_MBYTE)
82248229
if (curwin->w_cursor.col > 0 && curwin->w_p_wrap)
82258230
{
@@ -8228,7 +8233,6 @@ nv_g_cmd(cap)
82288233
* the end of the line. We do not want to advance to
82298234
* the next screen line.
82308235
*/
8231-
validate_virtcol();
82328236
if (curwin->w_virtcol > (colnr_T)i)
82338237
--curwin->w_cursor.col;
82348238
}

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,8 @@ static char *(features[]) =
728728

729729
static int included_patches[] =
730730
{ /* Add new patch number below this line */
731+
/**/
732+
7,
731733
/**/
732734
6,
733735
/**/

0 commit comments

Comments
 (0)