To: vim-dev@vim.org Subject: Patch 6.3b.016 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.3b.016 Problem: When 'virtualedit' is used "x" doesn't delete the last character of a line that has as many characters as 'columns'. (Yakov Lerner) Solution: When the cursor isn't moved let oneright() return FAIL. Files: src/edit.c *** ../vim-6.3b.015/src/edit.c Sun May 16 22:38:42 2004 --- src/edit.c Sun May 30 21:19:16 2004 *************** *** 4844,4849 **** --- 4844,4851 ---- #ifdef FEAT_VIRTUALEDIT if (virtual_active()) { + pos_T prevpos = curwin->w_cursor; + /* Adjust for multi-wide char (excluding TAB) */ ptr = ml_get_cursor(); coladvance(getviscol() + ((*ptr != TAB && vim_isprintc( *************** *** 4855,4861 **** )) ? ptr2cells(ptr) : 1)); curwin->w_set_curswant = TRUE; ! return OK; } #endif --- 4857,4865 ---- )) ? ptr2cells(ptr) : 1)); curwin->w_set_curswant = TRUE; ! /* Return OK if the cursor moved, FAIL otherwise (at window edge). */ ! return (prevpos.col != curwin->w_cursor.col ! || prevpos.coladd != curwin->w_cursor.coladd) ? OK : FAIL; } #endif *** ../vim-6.3b.015/src/version.c Sun May 30 20:32:09 2004 --- src/version.c Sun May 30 21:21:59 2004 *************** *** 643,644 **** --- 643,646 ---- { /* Add new patch number below this line */ + /**/ + 16, /**/ -- hundred-and-one symptoms of being an internet addict: 6. You refuse to go to a vacation spot with no electricity and no phone lines. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///