Blame SOURCES/7.4.349

22c937
To: vim_dev@googlegroups.com
22c937
Subject: Patch 7.4.349
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.349
22c937
Problem:    When there are matches to highlight the whole window is redrawn,
22c937
	    which is slow.
22c937
Solution:   Only redraw everything when lines were inserted or deleted.
22c937
	    Reset b_mod_xlines when needed.  (Alexey Radkov)
22c937
Files:	    src/screen.c, src/window.c
22c937
22c937
22c937
*** ../vim-7.4.348/src/screen.c	2014-06-25 18:15:18.446838249 +0200
22c937
--- src/screen.c	2014-06-28 15:35:18.868836570 +0200
22c937
***************
22c937
*** 1769,1776 ****
22c937
  					syntax_check_changed(lnum)))
22c937
  #endif
22c937
  #ifdef FEAT_SEARCH_EXTRA
22c937
! 				/* match in fixed position might need redraw */
22c937
! 				||  wp->w_match_head != NULL
22c937
  #endif
22c937
  				)))))
22c937
  	{
22c937
--- 1769,1778 ----
22c937
  					syntax_check_changed(lnum)))
22c937
  #endif
22c937
  #ifdef FEAT_SEARCH_EXTRA
22c937
! 				/* match in fixed position might need redraw
22c937
! 				 * if lines were inserted or deleted */
22c937
! 				|| (wp->w_match_head != NULL
22c937
! 						    && buf->b_mod_xlines != 0)
22c937
  #endif
22c937
  				)))))
22c937
  	{
22c937
*** ../vim-7.4.348/src/window.c	2014-06-25 18:15:18.446838249 +0200
22c937
--- src/window.c	2014-06-28 15:38:51.952839835 +0200
22c937
***************
22c937
*** 6904,6915 ****
22c937
  	    }
22c937
  	    else
22c937
  	    {
22c937
  		wp->w_buffer->b_mod_top = toplnum;
22c937
  		wp->w_buffer->b_mod_bot = botlnum;
22c937
  	    }
22c937
  	    m->pos.toplnum = toplnum;
22c937
  	    m->pos.botlnum = botlnum;
22c937
- 	    wp->w_buffer->b_mod_set = TRUE;
22c937
  	    rtype = VALID;
22c937
  	}
22c937
      }
22c937
--- 6904,6916 ----
22c937
  	    }
22c937
  	    else
22c937
  	    {
22c937
+ 		wp->w_buffer->b_mod_set = TRUE;
22c937
  		wp->w_buffer->b_mod_top = toplnum;
22c937
  		wp->w_buffer->b_mod_bot = botlnum;
22c937
+ 		wp->w_buffer->b_mod_xlines = 0;
22c937
  	    }
22c937
  	    m->pos.toplnum = toplnum;
22c937
  	    m->pos.botlnum = botlnum;
22c937
  	    rtype = VALID;
22c937
  	}
22c937
      }
22c937
***************
22c937
*** 6986,6995 ****
22c937
  	}
22c937
  	else
22c937
  	{
22c937
  	    wp->w_buffer->b_mod_top = cur->pos.toplnum;
22c937
  	    wp->w_buffer->b_mod_bot = cur->pos.botlnum;
22c937
  	}
22c937
- 	wp->w_buffer->b_mod_set = TRUE;
22c937
  	rtype = VALID;
22c937
      }
22c937
      vim_free(cur);
22c937
--- 6987,6997 ----
22c937
  	}
22c937
  	else
22c937
  	{
22c937
+ 	    wp->w_buffer->b_mod_set = TRUE;
22c937
  	    wp->w_buffer->b_mod_top = cur->pos.toplnum;
22c937
  	    wp->w_buffer->b_mod_bot = cur->pos.botlnum;
22c937
+ 	    wp->w_buffer->b_mod_xlines = 0;
22c937
  	}
22c937
  	rtype = VALID;
22c937
      }
22c937
      vim_free(cur);
22c937
*** ../vim-7.4.348/src/version.c	2014-07-02 17:02:29.726212319 +0200
22c937
--- src/version.c	2014-07-02 17:15:58.646224714 +0200
22c937
***************
22c937
*** 736,737 ****
22c937
--- 736,739 ----
22c937
  {   /* Add new patch number below this line */
22c937
+ /**/
22c937
+     349,
22c937
  /**/
22c937
22c937
-- 
22c937
Trees moving back and forth is what makes the wind blow.
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    ///