Karsten Hopp bd4aff
To: vim-dev@vim.org
Karsten Hopp bd4aff
Subject: Patch 7.0.041
Karsten Hopp bd4aff
Fcc: outbox
Karsten Hopp bd4aff
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp bd4aff
Mime-Version: 1.0
Karsten Hopp bd4aff
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp bd4aff
Content-Transfer-Encoding: 8bit
Karsten Hopp bd4aff
------------
Karsten Hopp bd4aff
Karsten Hopp bd4aff
Patch 7.0.041
Karsten Hopp bd4aff
Problem:    cursor([1, 1]) doesn't work. (Peter Hodge)
Karsten Hopp bd4aff
Solution:   Allow leaving out the third item of the list and use zero for the
Karsten Hopp bd4aff
	    virtual column offset.
Karsten Hopp bd4aff
Files:	    src/eval.c
Karsten Hopp bd4aff
Karsten Hopp bd4aff
Karsten Hopp bd4aff
*** ../vim-7.0.040/src/eval.c	Sun Jul 23 21:52:16 2006
Karsten Hopp bd4aff
--- src/eval.c	Mon Jul 10 23:03:13 2006
Karsten Hopp bd4aff
***************
Karsten Hopp bd4aff
*** 16465,16473 ****
Karsten Hopp bd4aff
      long	i = 0;
Karsten Hopp bd4aff
      long	n;
Karsten Hopp bd4aff
  
Karsten Hopp bd4aff
!     /* List must be: [fnum, lnum, col, coladd] */
Karsten Hopp bd4aff
!     if (arg->v_type != VAR_LIST || l == NULL
Karsten Hopp bd4aff
! 				      || l->lv_len != (fnump == NULL ? 3 : 4))
Karsten Hopp bd4aff
  	return FAIL;
Karsten Hopp bd4aff
  
Karsten Hopp bd4aff
      if (fnump != NULL)
Karsten Hopp bd4aff
--- 16465,16476 ----
Karsten Hopp bd4aff
      long	i = 0;
Karsten Hopp bd4aff
      long	n;
Karsten Hopp bd4aff
  
Karsten Hopp bd4aff
!     /* List must be: [fnum, lnum, col, coladd], where "fnum" is only there
Karsten Hopp bd4aff
!      * when "fnump" isn't NULL and "coladd" is optional. */
Karsten Hopp bd4aff
!     if (arg->v_type != VAR_LIST
Karsten Hopp bd4aff
! 	    || l == NULL
Karsten Hopp bd4aff
! 	    || l->lv_len < (fnump == NULL ? 2 : 3)
Karsten Hopp bd4aff
! 	    || l->lv_len > (fnump == NULL ? 3 : 4))
Karsten Hopp bd4aff
  	return FAIL;
Karsten Hopp bd4aff
  
Karsten Hopp bd4aff
      if (fnump != NULL)
Karsten Hopp bd4aff
***************
Karsten Hopp bd4aff
*** 16493,16500 ****
Karsten Hopp bd4aff
  #ifdef FEAT_VIRTUALEDIT
Karsten Hopp bd4aff
      n = list_find_nr(l, i, NULL);
Karsten Hopp bd4aff
      if (n < 0)
Karsten Hopp bd4aff
! 	return FAIL;
Karsten Hopp bd4aff
!     posp->coladd = n;
Karsten Hopp bd4aff
  #endif
Karsten Hopp bd4aff
  
Karsten Hopp bd4aff
      return OK;
Karsten Hopp bd4aff
--- 16496,16504 ----
Karsten Hopp bd4aff
  #ifdef FEAT_VIRTUALEDIT
Karsten Hopp bd4aff
      n = list_find_nr(l, i, NULL);
Karsten Hopp bd4aff
      if (n < 0)
Karsten Hopp bd4aff
! 	posp->coladd = 0;
Karsten Hopp bd4aff
!     else
Karsten Hopp bd4aff
! 	posp->coladd = n;
Karsten Hopp bd4aff
  #endif
Karsten Hopp bd4aff
  
Karsten Hopp bd4aff
      return OK;
Karsten Hopp bd4aff
*** ../vim-7.0.040/src/version.c	Sun Jul 23 21:52:16 2006
Karsten Hopp bd4aff
--- src/version.c	Sun Jul 23 21:59:43 2006
Karsten Hopp bd4aff
***************
Karsten Hopp bd4aff
*** 668,669 ****
Karsten Hopp bd4aff
--- 668,671 ----
Karsten Hopp bd4aff
  {   /* Add new patch number below this line */
Karsten Hopp bd4aff
+ /**/
Karsten Hopp bd4aff
+     41,
Karsten Hopp bd4aff
  /**/
Karsten Hopp bd4aff
Karsten Hopp bd4aff
-- 
Karsten Hopp bd4aff
hundred-and-one symptoms of being an internet addict:
Karsten Hopp bd4aff
43. You tell the kids they can't use the computer because "Daddy's got work to
Karsten Hopp bd4aff
    do" and you don't even have a job.
Karsten Hopp bd4aff
Karsten Hopp bd4aff
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp bd4aff
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp bd4aff
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp bd4aff
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///