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