To: vim_dev@googlegroups.com Subject: Patch 7.4a.007 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4a.007 Problem: After "g$" with 'virtualedit' set, "k" moves to a different column. (Dimitar Dimitrov) Solution: Set w_curswant. (Christian Brabandt) Files: src/normal.c *** ../vim-7.4a.006/src/normal.c 2013-05-20 21:11:55.000000000 +0200 --- src/normal.c 2013-07-09 17:00:51.000000000 +0200 *************** *** 8220,8225 **** --- 8220,8230 ---- 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,8234 **** * 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; } --- 8233,8238 ---- *** ../vim-7.4a.006/src/version.c 2013-07-09 14:58:06.000000000 +0200 --- src/version.c 2013-07-09 16:54:29.000000000 +0200 *************** *** 730,731 **** --- 730,733 ---- { /* Add new patch number below this line */ + /**/ + 7, /**/ -- JOHN CLEESE PLAYED: SECOND SOLDIER WITH A KEEN INTEREST IN BIRDS, LARGE MAN WITH DEAD BODY, BLACK KNIGHT, MR NEWT (A VILLAGE BLACKSMITH INTERESTED IN BURNING WITCHES), A QUITE EXTRAORDINARILY RUDE FRENCHMAN, TIM THE WIZARD, SIR LAUNCELOT "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///