To: vim-dev@vim.org Subject: Patch 6.2.004 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.004 Problem: With a line-Visual selection at the end of the file a "p" command puts the text one line upwards. Solution: Detect that the last line was deleted and put forward. (Taro Muraoka) Files: src/normal.c *** ../vim-6.2.003/src/normal.c Wed May 21 16:44:35 2003 --- src/normal.c Mon Jun 2 20:38:14 2003 *************** *** 8124,8132 **** if (VIsual_mode == Ctrl_V && dir == FORWARD) flags |= PUT_LINE_FORWARD; dir = BACKWARD; ! if (VIsual_mode != 'V' ! && curwin->w_cursor.col < curbuf->b_op_start.col) ! /* cursor is at the end of the line, put forward. */ dir = FORWARD; } #endif --- 8124,8135 ---- if (VIsual_mode == Ctrl_V && dir == FORWARD) flags |= PUT_LINE_FORWARD; dir = BACKWARD; ! if ((VIsual_mode != 'V' ! && curwin->w_cursor.col < curbuf->b_op_start.col) ! || (VIsual_mode == 'V' ! && curwin->w_cursor.lnum < curbuf->b_op_start.lnum)) ! /* cursor is at the end of the line or end of file, put ! * forward. */ dir = FORWARD; } #endif *** ../vim-6.2.003/src/version.c Mon Jun 2 22:16:24 2003 --- src/version.c Mon Jun 2 22:19:50 2003 *************** *** 632,633 **** --- 632,635 ---- { /* Add new patch number below this line */ + /**/ + 4, /**/ -- Q: Should I clean my house or work on Vim? A: Whatever contains more bugs. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///