Mercurial > vim
changeset 5162:c624928fbc49 v7.4a.007
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)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 09 Jul 2013 17:08:29 +0200 |
parents | f7add3891e95 |
children | 4c96040b1d93 |
files | src/normal.c src/version.c |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/normal.c +++ b/src/normal.c @@ -8220,6 +8220,11 @@ nv_g_cmd(cap) i += ((curwin->w_virtcol - width1) / width2 + 1) * width2; coladvance((colnr_T)i); + + /* Make sure we stick in this column. */ + validate_virtcol(); + curwin->w_curswant = curwin->w_virtcol; + curwin->w_set_curswant = FALSE; #if defined(FEAT_LINEBREAK) || defined(FEAT_MBYTE) if (curwin->w_cursor.col > 0 && curwin->w_p_wrap) { @@ -8228,7 +8233,6 @@ nv_g_cmd(cap) * the end of the line. We do not want to advance to * the next screen line. */ - validate_virtcol(); if (curwin->w_virtcol > (colnr_T)i) --curwin->w_cursor.col; }