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