Karsten Hopp 8b1199
To: vim_dev@googlegroups.com
Karsten Hopp 8b1199
Subject: Patch 7.4.578
Karsten Hopp 8b1199
Fcc: outbox
Karsten Hopp 8b1199
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 8b1199
Mime-Version: 1.0
Karsten Hopp 8b1199
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 8b1199
Content-Transfer-Encoding: 8bit
Karsten Hopp 8b1199
------------
Karsten Hopp 8b1199
Karsten Hopp 8b1199
Patch 7.4.578
Karsten Hopp 8b1199
Problem:    Using getcurpos() after "$" in an empty line returns a negative
Karsten Hopp 8b1199
	    number.
Karsten Hopp 8b1199
Solution:   Don't add one when this would overflow. (Hirohito Higashi)
Karsten Hopp 8b1199
Files:	    src/eval.c
Karsten Hopp 8b1199
Karsten Hopp 8b1199
Karsten Hopp 8b1199
*** ../vim-7.4.577/src/eval.c	2015-01-14 17:14:57.351424263 +0100
Karsten Hopp 8b1199
--- src/eval.c	2015-01-14 18:55:46.945664363 +0100
Karsten Hopp 8b1199
***************
Karsten Hopp 8b1199
*** 11941,11947 ****
Karsten Hopp 8b1199
  #endif
Karsten Hopp 8b1199
  							      (varnumber_T)0);
Karsten Hopp 8b1199
  	if (getcurpos)
Karsten Hopp 8b1199
! 	    list_append_number(l, (varnumber_T)curwin->w_curswant + 1);
Karsten Hopp 8b1199
      }
Karsten Hopp 8b1199
      else
Karsten Hopp 8b1199
  	rettv->vval.v_number = FALSE;
Karsten Hopp 8b1199
--- 11941,11948 ----
Karsten Hopp 8b1199
  #endif
Karsten Hopp 8b1199
  							      (varnumber_T)0);
Karsten Hopp 8b1199
  	if (getcurpos)
Karsten Hopp 8b1199
! 	    list_append_number(l, curwin->w_curswant == MAXCOL ?
Karsten Hopp 8b1199
! 		    (varnumber_T)MAXCOL : (varnumber_T)curwin->w_curswant + 1);
Karsten Hopp 8b1199
      }
Karsten Hopp 8b1199
      else
Karsten Hopp 8b1199
  	rettv->vval.v_number = FALSE;
Karsten Hopp 8b1199
*** ../vim-7.4.577/src/version.c	2015-01-14 18:40:23.087769463 +0100
Karsten Hopp 8b1199
--- src/version.c	2015-01-14 18:54:47.734312885 +0100
Karsten Hopp 8b1199
***************
Karsten Hopp 8b1199
*** 743,744 ****
Karsten Hopp 8b1199
--- 743,746 ----
Karsten Hopp 8b1199
  {   /* Add new patch number below this line */
Karsten Hopp 8b1199
+ /**/
Karsten Hopp 8b1199
+     578,
Karsten Hopp 8b1199
  /**/
Karsten Hopp 8b1199
Karsten Hopp 8b1199
-- 
Karsten Hopp 8b1199
From "know your smileys":
Karsten Hopp 8b1199
 ~#:-(	I just washed my hair, and I can't do nuthin' with it.
Karsten Hopp 8b1199
Karsten Hopp 8b1199
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 8b1199
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 8b1199
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 8b1199
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///