Karsten Hopp cade0d
To: vim_dev@googlegroups.com
Karsten Hopp cade0d
Subject: Patch 7.3.362
Karsten Hopp cade0d
Fcc: outbox
Karsten Hopp cade0d
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp cade0d
Mime-Version: 1.0
Karsten Hopp cade0d
Content-Type: text/plain; charset=UTF-8
Karsten Hopp cade0d
Content-Transfer-Encoding: 8bit
Karsten Hopp cade0d
------------
Karsten Hopp cade0d
Karsten Hopp cade0d
Patch 7.3.362
Karsten Hopp cade0d
Problem:    ml_get error when using ":g" with folded lines.
Karsten Hopp cade0d
Solution:   Adjust the line number for changed_lines(). (Christian Brabandt)
Karsten Hopp cade0d
Files:	    src/ex_cmds.c
Karsten Hopp cade0d
Karsten Hopp cade0d
Karsten Hopp cade0d
*** ../vim-7.3.361/src/ex_cmds.c	2011-10-20 18:17:38.000000000 +0200
Karsten Hopp cade0d
--- src/ex_cmds.c	2011-11-30 16:58:34.000000000 +0100
Karsten Hopp cade0d
***************
Karsten Hopp cade0d
*** 820,826 ****
Karsten Hopp cade0d
  	curwin->w_cursor.lnum = dest + (line2 - line1) + 1;
Karsten Hopp cade0d
  
Karsten Hopp cade0d
      if (line1 < dest)
Karsten Hopp cade0d
! 	changed_lines(line1, 0, dest + num_lines + 1, 0L);
Karsten Hopp cade0d
      else
Karsten Hopp cade0d
  	changed_lines(dest + 1, 0, line1 + num_lines, 0L);
Karsten Hopp cade0d
  
Karsten Hopp cade0d
--- 820,832 ----
Karsten Hopp cade0d
  	curwin->w_cursor.lnum = dest + (line2 - line1) + 1;
Karsten Hopp cade0d
  
Karsten Hopp cade0d
      if (line1 < dest)
Karsten Hopp cade0d
!     {
Karsten Hopp cade0d
! 	dest += num_lines + 1;
Karsten Hopp cade0d
! 	last_line = curbuf->b_ml.ml_line_count;
Karsten Hopp cade0d
! 	if (dest > last_line + 1)
Karsten Hopp cade0d
! 	    dest = last_line + 1;
Karsten Hopp cade0d
! 	changed_lines(line1, 0, dest, 0L);
Karsten Hopp cade0d
!     }
Karsten Hopp cade0d
      else
Karsten Hopp cade0d
  	changed_lines(dest + 1, 0, line1 + num_lines, 0L);
Karsten Hopp cade0d
  
Karsten Hopp cade0d
*** ../vim-7.3.361/src/version.c	2011-11-30 15:40:51.000000000 +0100
Karsten Hopp cade0d
--- src/version.c	2011-11-30 17:01:07.000000000 +0100
Karsten Hopp cade0d
***************
Karsten Hopp cade0d
*** 716,717 ****
Karsten Hopp cade0d
--- 716,719 ----
Karsten Hopp cade0d
  {   /* Add new patch number below this line */
Karsten Hopp cade0d
+ /**/
Karsten Hopp cade0d
+     362,
Karsten Hopp cade0d
  /**/
Karsten Hopp cade0d
Karsten Hopp cade0d
-- 
Karsten Hopp cade0d
hundred-and-one symptoms of being an internet addict:
Karsten Hopp cade0d
218. Your spouse hands you a gift wrapped magnet with your PC's name
Karsten Hopp cade0d
     on it and you accuse him or her of genocide.
Karsten Hopp cade0d
Karsten Hopp cade0d
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp cade0d
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp cade0d
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp cade0d
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///