Blame SOURCES/7.4.328

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