jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.328

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