Karsten Hopp fdeddd
To: vim-dev@vim.org
Karsten Hopp fdeddd
Subject: Patch 7.1.229
Karsten Hopp fdeddd
Fcc: outbox
Karsten Hopp fdeddd
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp fdeddd
Mime-Version: 1.0
Karsten Hopp fdeddd
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp fdeddd
Content-Transfer-Encoding: 8bit
Karsten Hopp fdeddd
------------
Karsten Hopp fdeddd
Karsten Hopp fdeddd
Patch 7.1.229
Karsten Hopp fdeddd
Problem:    A fold is closed when it shouldn't when 'foldmethod' is "indent"
Karsten Hopp fdeddd
	    and backspacing a non-white character so that the indent increases.
Karsten Hopp fdeddd
Solution:   Keep the fold open after backspacing a character.
Karsten Hopp fdeddd
Files:	    src/edit.c
Karsten Hopp fdeddd
Karsten Hopp fdeddd
Karsten Hopp fdeddd
*** ../vim-7.1.228/src/edit.c	Sat Jan 12 18:13:05 2008
Karsten Hopp fdeddd
--- src/edit.c	Mon Jan 14 20:06:43 2008
Karsten Hopp fdeddd
***************
Karsten Hopp fdeddd
*** 8618,8623 ****
Karsten Hopp fdeddd
--- 8619,8632 ----
Karsten Hopp fdeddd
      if (vim_strchr(p_cpo, CPO_BACKSPACE) != NULL && dollar_vcol == 0)
Karsten Hopp fdeddd
  	dollar_vcol = curwin->w_virtcol;
Karsten Hopp fdeddd
  
Karsten Hopp fdeddd
+ #ifdef FEAT_FOLDING
Karsten Hopp fdeddd
+     /* When deleting a char the cursor line must never be in a closed fold.
Karsten Hopp fdeddd
+      * E.g., when 'foldmethod' is indent and deleting the first non-white
Karsten Hopp fdeddd
+      * char before a Tab. */
Karsten Hopp fdeddd
+     if (did_backspace)
Karsten Hopp fdeddd
+ 	foldOpenCursor();
Karsten Hopp fdeddd
+ #endif
Karsten Hopp fdeddd
+ 
Karsten Hopp fdeddd
      return did_backspace;
Karsten Hopp fdeddd
  }
Karsten Hopp fdeddd
  
Karsten Hopp fdeddd
*** ../vim-7.1.228/src/version.c	Sun Jan 13 21:57:25 2008
Karsten Hopp fdeddd
--- src/version.c	Mon Jan 14 20:08:35 2008
Karsten Hopp fdeddd
***************
Karsten Hopp fdeddd
*** 668,669 ****
Karsten Hopp fdeddd
--- 668,671 ----
Karsten Hopp fdeddd
  {   /* Add new patch number below this line */
Karsten Hopp fdeddd
+ /**/
Karsten Hopp fdeddd
+     229,
Karsten Hopp fdeddd
  /**/
Karsten Hopp fdeddd
Karsten Hopp fdeddd
-- 
Karsten Hopp fdeddd
ROBIN:  (warily) And if you get a question wrong?
Karsten Hopp fdeddd
ARTHUR: You are cast into the Gorge of Eternal Peril.
Karsten Hopp fdeddd
ROBIN:  Oh ... wacho!
Karsten Hopp fdeddd
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp fdeddd
Karsten Hopp fdeddd
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp fdeddd
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp fdeddd
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp fdeddd
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///