Blame SOURCES/7.4.349

d6ba96
To: vim_dev@googlegroups.com
d6ba96
Subject: Patch 7.4.349
d6ba96
Fcc: outbox
d6ba96
From: Bram Moolenaar <Bram@moolenaar.net>
d6ba96
Mime-Version: 1.0
d6ba96
Content-Type: text/plain; charset=UTF-8
d6ba96
Content-Transfer-Encoding: 8bit
d6ba96
------------
d6ba96
d6ba96
Patch 7.4.349
d6ba96
Problem:    When there are matches to highlight the whole window is redrawn,
d6ba96
	    which is slow.
d6ba96
Solution:   Only redraw everything when lines were inserted or deleted.
d6ba96
	    Reset b_mod_xlines when needed.  (Alexey Radkov)
d6ba96
Files:	    src/screen.c, src/window.c
d6ba96
d6ba96
d6ba96
*** ../vim-7.4.348/src/screen.c	2014-06-25 18:15:18.446838249 +0200
d6ba96
--- src/screen.c	2014-06-28 15:35:18.868836570 +0200
d6ba96
***************
d6ba96
*** 1769,1776 ****
d6ba96
  					syntax_check_changed(lnum)))
d6ba96
  #endif
d6ba96
  #ifdef FEAT_SEARCH_EXTRA
d6ba96
! 				/* match in fixed position might need redraw */
d6ba96
! 				||  wp->w_match_head != NULL
d6ba96
  #endif
d6ba96
  				)))))
d6ba96
  	{
d6ba96
--- 1769,1778 ----
d6ba96
  					syntax_check_changed(lnum)))
d6ba96
  #endif
d6ba96
  #ifdef FEAT_SEARCH_EXTRA
d6ba96
! 				/* match in fixed position might need redraw
d6ba96
! 				 * if lines were inserted or deleted */
d6ba96
! 				|| (wp->w_match_head != NULL
d6ba96
! 						    && buf->b_mod_xlines != 0)
d6ba96
  #endif
d6ba96
  				)))))
d6ba96
  	{
d6ba96
*** ../vim-7.4.348/src/window.c	2014-06-25 18:15:18.446838249 +0200
d6ba96
--- src/window.c	2014-06-28 15:38:51.952839835 +0200
d6ba96
***************
d6ba96
*** 6904,6915 ****
d6ba96
  	    }
d6ba96
  	    else
d6ba96
  	    {
d6ba96
  		wp->w_buffer->b_mod_top = toplnum;
d6ba96
  		wp->w_buffer->b_mod_bot = botlnum;
d6ba96
  	    }
d6ba96
  	    m->pos.toplnum = toplnum;
d6ba96
  	    m->pos.botlnum = botlnum;
d6ba96
- 	    wp->w_buffer->b_mod_set = TRUE;
d6ba96
  	    rtype = VALID;
d6ba96
  	}
d6ba96
      }
d6ba96
--- 6904,6916 ----
d6ba96
  	    }
d6ba96
  	    else
d6ba96
  	    {
d6ba96
+ 		wp->w_buffer->b_mod_set = TRUE;
d6ba96
  		wp->w_buffer->b_mod_top = toplnum;
d6ba96
  		wp->w_buffer->b_mod_bot = botlnum;
d6ba96
+ 		wp->w_buffer->b_mod_xlines = 0;
d6ba96
  	    }
d6ba96
  	    m->pos.toplnum = toplnum;
d6ba96
  	    m->pos.botlnum = botlnum;
d6ba96
  	    rtype = VALID;
d6ba96
  	}
d6ba96
      }
d6ba96
***************
d6ba96
*** 6986,6995 ****
d6ba96
  	}
d6ba96
  	else
d6ba96
  	{
d6ba96
  	    wp->w_buffer->b_mod_top = cur->pos.toplnum;
d6ba96
  	    wp->w_buffer->b_mod_bot = cur->pos.botlnum;
d6ba96
  	}
d6ba96
- 	wp->w_buffer->b_mod_set = TRUE;
d6ba96
  	rtype = VALID;
d6ba96
      }
d6ba96
      vim_free(cur);
d6ba96
--- 6987,6997 ----
d6ba96
  	}
d6ba96
  	else
d6ba96
  	{
d6ba96
+ 	    wp->w_buffer->b_mod_set = TRUE;
d6ba96
  	    wp->w_buffer->b_mod_top = cur->pos.toplnum;
d6ba96
  	    wp->w_buffer->b_mod_bot = cur->pos.botlnum;
d6ba96
+ 	    wp->w_buffer->b_mod_xlines = 0;
d6ba96
  	}
d6ba96
  	rtype = VALID;
d6ba96
      }
d6ba96
      vim_free(cur);
d6ba96
*** ../vim-7.4.348/src/version.c	2014-07-02 17:02:29.726212319 +0200
d6ba96
--- src/version.c	2014-07-02 17:15:58.646224714 +0200
d6ba96
***************
d6ba96
*** 736,737 ****
d6ba96
--- 736,739 ----
d6ba96
  {   /* Add new patch number below this line */
d6ba96
+ /**/
d6ba96
+     349,
d6ba96
  /**/
d6ba96
d6ba96
-- 
d6ba96
Trees moving back and forth is what makes the wind blow.
d6ba96
d6ba96
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
d6ba96
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
d6ba96
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
d6ba96
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///