jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.562

3ef2ca
To: vim_dev@googlegroups.com
3ef2ca
Subject: Patch 7.4.562
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.562
3ef2ca
Problem:    Segfault with wide screen and error in 'rulerformat'. (Ingo Karkat)
3ef2ca
Solution:   Check there is enough space. (Christian Brabandt)
3ef2ca
Files:	    src/buffer.c, src/screen.c
3ef2ca
3ef2ca
3ef2ca
*** ../vim-7.4.561/src/buffer.c	2014-11-19 16:38:01.500680103 +0100
3ef2ca
--- src/buffer.c	2015-01-07 13:24:22.663808167 +0100
3ef2ca
***************
3ef2ca
*** 4409,4414 ****
3ef2ca
--- 4409,4416 ----
3ef2ca
      long	above; /* number of lines above window */
3ef2ca
      long	below; /* number of lines below window */
3ef2ca
  
3ef2ca
+     if (buflen < 3) /* need at least 3 chars for writing */
3ef2ca
+ 	return;
3ef2ca
      above = wp->w_topline - 1;
3ef2ca
  #ifdef FEAT_DIFF
3ef2ca
      above += diff_check_fill(wp, wp->w_topline) - wp->w_topfill;
3ef2ca
*** ../vim-7.4.561/src/screen.c	2014-12-13 03:36:34.988435244 +0100
3ef2ca
--- src/screen.c	2015-01-07 13:28:04.069254599 +0100
3ef2ca
***************
3ef2ca
*** 10588,10594 ****
3ef2ca
  	    this_ru_col = (WITH_WIDTH(width) + 1) / 2;
3ef2ca
  	if (this_ru_col + o < WITH_WIDTH(width))
3ef2ca
  	{
3ef2ca
! 	    while (this_ru_col + o < WITH_WIDTH(width))
3ef2ca
  	    {
3ef2ca
  #ifdef FEAT_MBYTE
3ef2ca
  		if (has_mbyte)
3ef2ca
--- 10588,10595 ----
3ef2ca
  	    this_ru_col = (WITH_WIDTH(width) + 1) / 2;
3ef2ca
  	if (this_ru_col + o < WITH_WIDTH(width))
3ef2ca
  	{
3ef2ca
! 	    /* need at least 3 chars left for get_rel_pos() + NUL */
3ef2ca
! 	    while (this_ru_col + o < WITH_WIDTH(width) && RULER_BUF_LEN > i + 4)
3ef2ca
  	    {
3ef2ca
  #ifdef FEAT_MBYTE
3ef2ca
  		if (has_mbyte)
3ef2ca
*** ../vim-7.4.561/src/version.c	2015-01-07 13:15:40.609829496 +0100
3ef2ca
--- src/version.c	2015-01-07 13:22:59.184770984 +0100
3ef2ca
***************
3ef2ca
*** 743,744 ****
3ef2ca
--- 743,746 ----
3ef2ca
  {   /* Add new patch number below this line */
3ef2ca
+ /**/
3ef2ca
+     562,
3ef2ca
  /**/
3ef2ca
3ef2ca
-- 
3ef2ca
"I can't complain, but sometimes I still do."   (Joe Walsh)
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    ///