073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.328
073263
Fcc: outbox
073263
From: Bram Moolenaar <Bram@moolenaar.net>
073263
Mime-Version: 1.0
073263
Content-Type: text/plain; charset=UTF-8
073263
Content-Transfer-Encoding: 8bit
073263
------------
073263
073263
Patch 7.4.328
073263
Problem:    Selection of inner block is inconsistent.
073263
Solution:   Skip indent not only for '}' but all parens. (Tom McDonald)
073263
Files:	    src/search.c
073263
073263
073263
*** ../vim-7.4.327/src/search.c	2014-03-23 15:12:29.935264336 +0100
073263
--- src/search.c	2014-06-17 12:37:49.075923106 +0200
073263
***************
073263
*** 3608,3628 ****
073263
  
073263
      /*
073263
       * Try to exclude the '(', '{', ')', '}', etc. when "include" is FALSE.
073263
!      * If the ending '}' is only preceded by indent, skip that indent.
073263
!      * But only if the resulting area is not smaller than what we started with.
073263
       */
073263
      while (!include)
073263
      {
073263
  	incl(&start_pos);
073263
  	sol = (curwin->w_cursor.col == 0);
073263
  	decl(&curwin->w_cursor);
073263
! 	if (what == '{')
073263
! 	    while (inindent(1))
073263
! 	    {
073263
! 		sol = TRUE;
073263
! 		if (decl(&curwin->w_cursor) != 0)
073263
! 		    break;
073263
! 	    }
073263
  	/*
073263
  	 * In Visual mode, when the resulting area is not bigger than what we
073263
  	 * started with, extend it to the next block, and then exclude again.
073263
--- 3608,3629 ----
073263
  
073263
      /*
073263
       * Try to exclude the '(', '{', ')', '}', etc. when "include" is FALSE.
073263
!      * If the ending '}', ')' or ']' is only preceded by indent, skip that
073263
!      * indent.  But only if the resulting area is not smaller than what we
073263
!      * started with.
073263
       */
073263
      while (!include)
073263
      {
073263
  	incl(&start_pos);
073263
  	sol = (curwin->w_cursor.col == 0);
073263
  	decl(&curwin->w_cursor);
073263
! 	while (inindent(1))
073263
! 	{
073263
! 	    sol = TRUE;
073263
! 	    if (decl(&curwin->w_cursor) != 0)
073263
! 		break;
073263
! 	}
073263
! 
073263
  	/*
073263
  	 * In Visual mode, when the resulting area is not bigger than what we
073263
  	 * started with, extend it to the next block, and then exclude again.
073263
*** ../vim-7.4.327/src/version.c	2014-06-17 12:51:13.207953527 +0200
073263
--- src/version.c	2014-06-17 12:52:35.279956632 +0200
073263
***************
073263
*** 736,737 ****
073263
--- 736,739 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     328,
073263
  /**/
073263
073263
-- 
073263
FATHER: One day, lad, all this will be yours ...
073263
PRINCE: What - the curtains?
073263
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
073263
073263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
073263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
073263
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
073263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///