To: vim-dev@vim.org Subject: Patch 6.4b.004 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.4b.004 Problem: Selecting a {} block with "viB" includes the '}' when there is an empty line before it. Solution: Don't advance the cursor to include a line break when it's already at the line break. Files: src/search.c *** ../vim-6.4b.003/src/search.c Thu Oct 6 20:41:27 2005 --- src/search.c Fri Oct 14 20:22:17 2005 *************** *** 3408,3414 **** { if (*p_sel == 'e') ++curwin->w_cursor.col; ! if (sol) inc(&curwin->w_cursor); /* include the line break */ VIsual = start_pos; VIsual_mode = 'v'; --- 3408,3414 ---- { if (*p_sel == 'e') ++curwin->w_cursor.col; ! if (sol && gchar_cursor() != NUL) inc(&curwin->w_cursor); /* include the line break */ VIsual = start_pos; VIsual_mode = 'v'; *** ../vim-6.4b.003/src/version.c Fri Oct 14 17:44:45 2005 --- src/version.c Fri Oct 14 22:34:30 2005 *************** *** 643,644 **** --- 643,646 ---- { /* Add new patch number below this line */ + /**/ + 4, /**/ -- How To Keep A Healthy Level Of Insanity: 13. Go to a poetry recital and ask why the poems don't rhyme. /// 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 LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///