To: vim-dev@vim.org Subject: Patch 6.0.038 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.0.038 Problem: When 'selection' is "exclusive", deleting a block of text at the end of a line can leave the cursor beyond the end of the line. Solution: Correct the cursor position. Files: src/ops.c *** ../vim60.37/src/ops.c Sun Oct 28 16:41:29 2001 --- src/ops.c Tue Oct 30 11:14:22 2001 *************** *** 1575,1581 **** ml_replace(lnum, newp, FALSE); } ! /* Put cursor back at start of changed block */ changed_lines(curwin->w_cursor.lnum, curwin->w_cursor.col, oap->end.lnum + 1, 0L); oap->line_count = 0; /* no lines deleted */ --- 1575,1581 ---- ml_replace(lnum, newp, FALSE); } ! check_cursor_col(); changed_lines(curwin->w_cursor.lnum, curwin->w_cursor.col, oap->end.lnum + 1, 0L); oap->line_count = 0; /* no lines deleted */ *** ../vim60.37/src/version.c Tue Oct 30 11:17:56 2001 --- src/version.c Tue Oct 30 11:17:22 2001 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 38, /**/ -- ROBIN: The what? ARTHUR: The Holy Hand Grenade of Antioch. 'Tis one of the sacred relics Brother Maynard always carries with him. ALL: Yes. Of course. ARTHUR: (shouting) Bring up the Holy Hand Grenade! "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// 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 ///