Karsten Hopp a14672
To: vim-dev@vim.org
Karsten Hopp a14672
Subject: Patch 7.2.014
Karsten Hopp a14672
Fcc: outbox
Karsten Hopp a14672
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp a14672
Mime-Version: 1.0
Karsten Hopp a14672
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp a14672
Content-Transfer-Encoding: 8bit
Karsten Hopp a14672
------------
Karsten Hopp a14672
Karsten Hopp a14672
Patch 7.2.014
Karsten Hopp a14672
Problem:    synstack() doesn't work in an emptly line.
Karsten Hopp a14672
Solution:   Accept column zero as a valid position.
Karsten Hopp a14672
Files:	    src/eval.c
Karsten Hopp a14672
Karsten Hopp a14672
Karsten Hopp a14672
*** ../vim-7.2.013/src/eval.c	Sun Sep  7 13:54:31 2008
Karsten Hopp a14672
--- src/eval.c	Sun Sep  7 13:50:38 2008
Karsten Hopp a14672
***************
Karsten Hopp a14672
*** 16667,16673 ****
Karsten Hopp a14672
      col = get_tv_number(&argvars[1]) - 1;	/* -1 on type error */
Karsten Hopp a14672
  
Karsten Hopp a14672
      if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count
Karsten Hopp a14672
! 	    && col >= 0 && col < (long)STRLEN(ml_get(lnum))
Karsten Hopp a14672
  	    && rettv_list_alloc(rettv) != FAIL)
Karsten Hopp a14672
      {
Karsten Hopp a14672
  	(void)syn_get_id(curwin, lnum, (colnr_T)col, FALSE, NULL, TRUE);
Karsten Hopp a14672
--- 16667,16673 ----
Karsten Hopp a14672
      col = get_tv_number(&argvars[1]) - 1;	/* -1 on type error */
Karsten Hopp a14672
  
Karsten Hopp a14672
      if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count
Karsten Hopp a14672
! 	    && col >= 0 && (col == 0 || col < (long)STRLEN(ml_get(lnum)))
Karsten Hopp a14672
  	    && rettv_list_alloc(rettv) != FAIL)
Karsten Hopp a14672
      {
Karsten Hopp a14672
  	(void)syn_get_id(curwin, lnum, (colnr_T)col, FALSE, NULL, TRUE);
Karsten Hopp a14672
*** ../vim-7.2.013/src/version.c	Sun Sep  7 21:47:51 2008
Karsten Hopp a14672
--- src/version.c	Wed Sep 10 15:36:52 2008
Karsten Hopp a14672
***************
Karsten Hopp a14672
*** 678,679 ****
Karsten Hopp a14672
--- 678,681 ----
Karsten Hopp a14672
  {   /* Add new patch number below this line */
Karsten Hopp a14672
+ /**/
Karsten Hopp a14672
+     14,
Karsten Hopp a14672
  /**/
Karsten Hopp a14672
Karsten Hopp a14672
-- 
Karsten Hopp a14672
Everybody lies, but it doesn't matter since nobody listens.
Karsten Hopp a14672
                                -- Lieberman's Law
Karsten Hopp a14672
Karsten Hopp a14672
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp a14672
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp a14672
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp a14672
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///