To: vim-dev@vim.org Subject: Patch 6.0.091 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.0.091 Problem: Using CTRL-O in Insert mode, while 'virtualedit' is "all" and the cursor is after the end-of-line, moves the cursor left. (Yegappan Lakshmanan) Solution: Keep the cursor in the same position. Files: src/edit.c *** ../vim60.90/src/edit.c Sun Sep 23 21:34:28 2001 --- src/edit.c Tue Nov 6 09:10:57 2001 *************** *** 742,748 **** else restart_edit = 'I'; o_lnum = curwin->w_cursor.lnum; ! o_eol = (gchar_cursor() == NUL); goto doESCkey; #ifdef FEAT_SNIFF --- 742,753 ---- else restart_edit = 'I'; o_lnum = curwin->w_cursor.lnum; ! #ifdef FEAT_VIRTUALEDIT ! if (virtual_active()) ! o_eol = FALSE; /* cursor always keeps its column */ ! else ! #endif ! o_eol = (gchar_cursor() == NUL); goto doESCkey; #ifdef FEAT_SNIFF *************** *** 5631,5637 **** --- 5636,5646 ---- { #ifdef FEAT_VIRTUALEDIT if (curwin->w_cursor.coladd > 0 || ve_flags == VE_ALL) + { oneleft(); + if (restart_edit != NUL) + ++curwin->w_cursor.coladd; + } else #endif --curwin->w_cursor.col; *** ../vim60.90/src/version.c Tue Nov 6 21:48:06 2001 --- src/version.c Tue Nov 6 21:54:31 2001 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 91, /**/ -- How To Keep A Healthy Level Of Insanity: 4. Put your garbage can on your desk and label it "in". /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim ))) \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///