2102f06
To: vim-dev@vim.org
2102f06
Subject: Patch 7.2.301
2102f06
Fcc: outbox
2102f06
From: Bram Moolenaar <Bram@moolenaar.net>
2102f06
Mime-Version: 1.0
2102f06
Content-Type: text/plain; charset=UTF-8
2102f06
Content-Transfer-Encoding: 8bit
2102f06
------------
2102f06
2102f06
NOTE: some mail and patch programs may have a problem with the non-ASCII
2102f06
characters in this patch.  You can fetch the patch from
2102f06
ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.301  and/or fetch the updated
2102f06
files from CVS.  http://www.vim.org/cvs.php
2102f06
2102f06
2102f06
Patch 7.2.301
2102f06
Problem:    Formatting is wrong when 'tw' is set to a small value.
2102f06
Solution:   Fix it and add tests.  Also fix behavior of "1" in 'fo'. (Yukihiro
2102f06
	    Nakadaira)
2102f06
Files:	    src/edit.c, src/testdir/Makefile, src/testdir/test68.in,
2102f06
	    src/testdir/test68.ok, src/testdir/test69.in,
2102f06
	    src/testdir/test69.ok
2102f06
2102f06
2102f06
*** ../vim-7.2.300/src/edit.c	2009-11-11 13:22:32.000000000 +0100
2102f06
--- src/edit.c	2009-11-17 15:34:47.000000000 +0100
2102f06
***************
2102f06
*** 181,187 ****
2102f06
  static void ins_ctrl_v __ARGS((void));
2102f06
  static void undisplay_dollar __ARGS((void));
2102f06
  static void insert_special __ARGS((int, int, int));
2102f06
! static void internal_format __ARGS((int textwidth, int second_indent, int flags, int format_only));
2102f06
  static void check_auto_format __ARGS((int));
2102f06
  static void redo_literal __ARGS((int c));
2102f06
  static void start_arrow __ARGS((pos_T *end_insert_pos));
2102f06
--- 181,187 ----
2102f06
  static void ins_ctrl_v __ARGS((void));
2102f06
  static void undisplay_dollar __ARGS((void));
2102f06
  static void insert_special __ARGS((int, int, int));
2102f06
! static void internal_format __ARGS((int textwidth, int second_indent, int flags, int format_only, int c));
2102f06
  static void check_auto_format __ARGS((int));
2102f06
  static void redo_literal __ARGS((int c));
2102f06
  static void start_arrow __ARGS((pos_T *end_insert_pos));
2102f06
***************
2102f06
*** 2164,2170 ****
2102f06
      int		i, c;
2102f06
      int		actual_len;		/* Take multi-byte characters */
2102f06
      int		actual_compl_length;	/* into account. */
2102f06
!     int		*wca;		        /* Wide character array. */
2102f06
      int		has_lower = FALSE;
2102f06
      int		was_letter = FALSE;
2102f06
  
2102f06
--- 2164,2170 ----
2102f06
      int		i, c;
2102f06
      int		actual_len;		/* Take multi-byte characters */
2102f06
      int		actual_compl_length;	/* into account. */
2102f06
!     int		*wca;			/* Wide character array. */
2102f06
      int		has_lower = FALSE;
2102f06
      int		was_letter = FALSE;
2102f06
  
2102f06
***************
2102f06
*** 5558,5564 ****
2102f06
  	}
2102f06
  	if (do_internal)
2102f06
  #endif
2102f06
! 	    internal_format(textwidth, second_indent, flags, c == NUL);
2102f06
      }
2102f06
  
2102f06
      if (c == NUL)	    /* only formatting was wanted */
2102f06
--- 5558,5564 ----
2102f06
  	}
2102f06
  	if (do_internal)
2102f06
  #endif
2102f06
! 	    internal_format(textwidth, second_indent, flags, c == NUL, c);
2102f06
      }
2102f06
  
2102f06
      if (c == NUL)	    /* only formatting was wanted */
2102f06
***************
2102f06
*** 5738,5748 ****
2102f06
   * Format text at the current insert position.
2102f06
   */
2102f06
      static void
2102f06
! internal_format(textwidth, second_indent, flags, format_only)
2102f06
      int		textwidth;
2102f06
      int		second_indent;
2102f06
      int		flags;
2102f06
      int		format_only;
2102f06
  {
2102f06
      int		cc;
2102f06
      int		save_char = NUL;
2102f06
--- 5738,5749 ----
2102f06
   * Format text at the current insert position.
2102f06
   */
2102f06
      static void
2102f06
! internal_format(textwidth, second_indent, flags, format_only, c)
2102f06
      int		textwidth;
2102f06
      int		second_indent;
2102f06
      int		flags;
2102f06
      int		format_only;
2102f06
+     int		c; /* character to be inserted (can be NUL) */
2102f06
  {
2102f06
      int		cc;
2102f06
      int		save_char = NUL;
2102f06
***************
2102f06
*** 5763,5769 ****
2102f06
       * When 'ai' is off we don't want a space under the cursor to be
2102f06
       * deleted.  Replace it with an 'x' temporarily.
2102f06
       */
2102f06
!     if (!curbuf->b_p_ai)
2102f06
      {
2102f06
  	cc = gchar_cursor();
2102f06
  	if (vim_iswhite(cc))
2102f06
--- 5764,5774 ----
2102f06
       * When 'ai' is off we don't want a space under the cursor to be
2102f06
       * deleted.  Replace it with an 'x' temporarily.
2102f06
       */
2102f06
!     if (!curbuf->b_p_ai
2102f06
! #ifdef FEAT_VREPLACE
2102f06
! 	    && !(State & VREPLACE_FLAG)
2102f06
! #endif
2102f06
! 	    )
2102f06
      {
2102f06
  	cc = gchar_cursor();
2102f06
  	if (vim_iswhite(cc))
2102f06
***************
2102f06
*** 5789,5797 ****
2102f06
  	char_u	*saved_text = NULL;
2102f06
  #endif
2102f06
  	colnr_T	col;
2102f06
  
2102f06
! 	virtcol = get_nolist_virtcol();
2102f06
! 	if (virtcol < (colnr_T)textwidth)
2102f06
  	    break;
2102f06
  
2102f06
  #ifdef FEAT_COMMENTS
2102f06
--- 5794,5804 ----
2102f06
  	char_u	*saved_text = NULL;
2102f06
  #endif
2102f06
  	colnr_T	col;
2102f06
+ 	colnr_T	end_col;
2102f06
  
2102f06
! 	virtcol = get_nolist_virtcol()
2102f06
! 		+ char2cells(c != NUL ? c : gchar_cursor());
2102f06
! 	if (virtcol <= (colnr_T)textwidth)
2102f06
  	    break;
2102f06
  
2102f06
  #ifdef FEAT_COMMENTS
2102f06
***************
2102f06
*** 5831,5842 ****
2102f06
  	coladvance((colnr_T)textwidth);
2102f06
  	wantcol = curwin->w_cursor.col;
2102f06
  
2102f06
! 	curwin->w_cursor.col = startcol - 1;
2102f06
! #ifdef FEAT_MBYTE
2102f06
! 	/* Correct cursor for multi-byte character. */
2102f06
! 	if (has_mbyte)
2102f06
! 	    mb_adjust_cursor();
2102f06
! #endif
2102f06
  	foundcol = 0;
2102f06
  
2102f06
  	/*
2102f06
--- 5838,5844 ----
2102f06
  	coladvance((colnr_T)textwidth);
2102f06
  	wantcol = curwin->w_cursor.col;
2102f06
  
2102f06
! 	curwin->w_cursor.col = startcol;
2102f06
  	foundcol = 0;
2102f06
  
2102f06
  	/*
2102f06
***************
2102f06
*** 5847,5857 ****
2102f06
  		    || curwin->w_cursor.lnum != Insstart.lnum
2102f06
  		    || curwin->w_cursor.col >= Insstart.col)
2102f06
  	{
2102f06
! 	    cc = gchar_cursor();
2102f06
  	    if (WHITECHAR(cc))
2102f06
  	    {
2102f06
  		/* remember position of blank just before text */
2102f06
! 		end_foundcol = curwin->w_cursor.col;
2102f06
  
2102f06
  		/* find start of sequence of blanks */
2102f06
  		while (curwin->w_cursor.col > 0 && WHITECHAR(cc))
2102f06
--- 5849,5862 ----
2102f06
  		    || curwin->w_cursor.lnum != Insstart.lnum
2102f06
  		    || curwin->w_cursor.col >= Insstart.col)
2102f06
  	{
2102f06
! 	    if (curwin->w_cursor.col == startcol && c != NUL)
2102f06
! 		cc = c;
2102f06
! 	    else
2102f06
! 		cc = gchar_cursor();
2102f06
  	    if (WHITECHAR(cc))
2102f06
  	    {
2102f06
  		/* remember position of blank just before text */
2102f06
! 		end_col = curwin->w_cursor.col;
2102f06
  
2102f06
  		/* find start of sequence of blanks */
2102f06
  		while (curwin->w_cursor.col > 0 && WHITECHAR(cc))
2102f06
***************
2102f06
*** 5871,5877 ****
2102f06
  		    /* do not break after one-letter words */
2102f06
  		    if (curwin->w_cursor.col == 0)
2102f06
  			break;	/* one-letter word at begin */
2102f06
! 
2102f06
  		    col = curwin->w_cursor.col;
2102f06
  		    dec_cursor();
2102f06
  		    cc = gchar_cursor();
2102f06
--- 5876,5886 ----
2102f06
  		    /* do not break after one-letter words */
2102f06
  		    if (curwin->w_cursor.col == 0)
2102f06
  			break;	/* one-letter word at begin */
2102f06
! #ifdef FEAT_COMMENTS
2102f06
! 		    /* do not break "#a b" when 'tw' is 2 */
2102f06
! 		    if (curwin->w_cursor.col <= leader_len)
2102f06
! 			break;
2102f06
! #endif
2102f06
  		    col = curwin->w_cursor.col;
2102f06
  		    dec_cursor();
2102f06
  		    cc = gchar_cursor();
2102f06
***************
2102f06
*** 5880,5905 ****
2102f06
  			continue;	/* one-letter, continue */
2102f06
  		    curwin->w_cursor.col = col;
2102f06
  		}
2102f06
! #ifdef FEAT_MBYTE
2102f06
! 		if (has_mbyte)
2102f06
! 		    foundcol = curwin->w_cursor.col
2102f06
! 					 + (*mb_ptr2len)(ml_get_cursor());
2102f06
! 		else
2102f06
! #endif
2102f06
! 		    foundcol = curwin->w_cursor.col + 1;
2102f06
! 		if (curwin->w_cursor.col < (colnr_T)wantcol)
2102f06
  		    break;
2102f06
  	    }
2102f06
  #ifdef FEAT_MBYTE
2102f06
! 	    else if (cc >= 0x100 && fo_multibyte
2102f06
! 			      && curwin->w_cursor.col <= (colnr_T)wantcol)
2102f06
  	    {
2102f06
  		/* Break after or before a multi-byte character. */
2102f06
  		foundcol = curwin->w_cursor.col;
2102f06
- 		if (curwin->w_cursor.col < (colnr_T)wantcol)
2102f06
- 		    foundcol += (*mb_char2len)(cc);
2102f06
  		end_foundcol = foundcol;
2102f06
! 		break;
2102f06
  	    }
2102f06
  #endif
2102f06
  	    if (curwin->w_cursor.col == 0)
2102f06
--- 5889,5948 ----
2102f06
  			continue;	/* one-letter, continue */
2102f06
  		    curwin->w_cursor.col = col;
2102f06
  		}
2102f06
! 
2102f06
! 		inc_cursor();
2102f06
! 
2102f06
! 		end_foundcol = end_col + 1;
2102f06
! 		foundcol = curwin->w_cursor.col;
2102f06
! 		if (curwin->w_cursor.col <= (colnr_T)wantcol)
2102f06
  		    break;
2102f06
  	    }
2102f06
  #ifdef FEAT_MBYTE
2102f06
! 	    else if (cc >= 0x100 && fo_multibyte)
2102f06
  	    {
2102f06
  		/* Break after or before a multi-byte character. */
2102f06
+ 		if (curwin->w_cursor.col != startcol)
2102f06
+ 		{
2102f06
+ #ifdef FEAT_COMMENTS
2102f06
+ 		    /* Don't break until after the comment leader */
2102f06
+ 		    if (curwin->w_cursor.col < leader_len)
2102f06
+ 			break;
2102f06
+ #endif
2102f06
+ 		    col = curwin->w_cursor.col;
2102f06
+ 		    inc_cursor();
2102f06
+ 		    /* Don't change end_foundcol if already set. */
2102f06
+ 		    if (foundcol != curwin->w_cursor.col)
2102f06
+ 		    {
2102f06
+ 			foundcol = curwin->w_cursor.col;
2102f06
+ 			end_foundcol = foundcol;
2102f06
+ 			if (curwin->w_cursor.col <= (colnr_T)wantcol)
2102f06
+ 			    break;
2102f06
+ 		    }
2102f06
+ 		    curwin->w_cursor.col = col;
2102f06
+ 		}
2102f06
+ 
2102f06
+ 		if (curwin->w_cursor.col == 0)
2102f06
+ 		    break;
2102f06
+ 
2102f06
+ 		col = curwin->w_cursor.col;
2102f06
+ 
2102f06
+ 		dec_cursor();
2102f06
+ 		cc = gchar_cursor();
2102f06
+ 
2102f06
+ 		if (WHITECHAR(cc))
2102f06
+ 		    continue;		/* break with space */
2102f06
+ #ifdef FEAT_COMMENTS
2102f06
+ 		/* Don't break until after the comment leader */
2102f06
+ 		if (curwin->w_cursor.col < leader_len)
2102f06
+ 		    break;
2102f06
+ #endif
2102f06
+ 
2102f06
+ 		curwin->w_cursor.col = col;
2102f06
+ 
2102f06
  		foundcol = curwin->w_cursor.col;
2102f06
  		end_foundcol = foundcol;
2102f06
! 		if (curwin->w_cursor.col <= (colnr_T)wantcol)
2102f06
! 		    break;
2102f06
  	    }
2102f06
  #endif
2102f06
  	    if (curwin->w_cursor.col == 0)
2102f06
***************
2102f06
*** 5926,5939 ****
2102f06
  	    orig_col = startcol;	/* Will start backspacing from here */
2102f06
  	else
2102f06
  #endif
2102f06
! 	    replace_offset = startcol - end_foundcol - 1;
2102f06
  
2102f06
  	/*
2102f06
  	 * adjust startcol for spaces that will be deleted and
2102f06
  	 * characters that will remain on top line
2102f06
  	 */
2102f06
  	curwin->w_cursor.col = foundcol;
2102f06
! 	while (cc = gchar_cursor(), WHITECHAR(cc))
2102f06
  	    inc_cursor();
2102f06
  	startcol -= curwin->w_cursor.col;
2102f06
  	if (startcol < 0)
2102f06
--- 5969,5983 ----
2102f06
  	    orig_col = startcol;	/* Will start backspacing from here */
2102f06
  	else
2102f06
  #endif
2102f06
! 	    replace_offset = startcol - end_foundcol;
2102f06
  
2102f06
  	/*
2102f06
  	 * adjust startcol for spaces that will be deleted and
2102f06
  	 * characters that will remain on top line
2102f06
  	 */
2102f06
  	curwin->w_cursor.col = foundcol;
2102f06
! 	while ((cc = gchar_cursor(), WHITECHAR(cc))
2102f06
! 		    && (!fo_white_par || curwin->w_cursor.col < startcol))
2102f06
  	    inc_cursor();
2102f06
  	startcol -= curwin->w_cursor.col;
2102f06
  	if (startcol < 0)
2102f06
***************
2102f06
*** 8509,8515 ****
2102f06
  	if (mode == BACKSPACE_LINE
2102f06
  		&& (curbuf->b_p_ai
2102f06
  #ifdef FEAT_CINDENT
2102f06
!                     || cindent_on()
2102f06
  #endif
2102f06
  		   )
2102f06
  #ifdef FEAT_RIGHTLEFT
2102f06
--- 8553,8559 ----
2102f06
  	if (mode == BACKSPACE_LINE
2102f06
  		&& (curbuf->b_p_ai
2102f06
  #ifdef FEAT_CINDENT
2102f06
! 		    || cindent_on()
2102f06
  #endif
2102f06
  		   )
2102f06
  #ifdef FEAT_RIGHTLEFT
2102f06
*** ../vim-7.2.300/src/testdir/Makefile	2009-11-17 17:36:13.000000000 +0100
2102f06
--- src/testdir/Makefile	2009-11-17 15:11:26.000000000 +0100
2102f06
***************
2102f06
*** 22,28 ****
2102f06
  		test48.out test49.out test51.out test52.out test53.out \
2102f06
  		test54.out test55.out test56.out test57.out test58.out \
2102f06
  		test59.out test60.out test61.out test62.out test63.out \
2102f06
! 		test64.out test65.out test66.out test67.out
2102f06
  
2102f06
  SCRIPTS_GUI = test16.out
2102f06
  
2102f06
--- 22,29 ----
2102f06
  		test48.out test49.out test51.out test52.out test53.out \
2102f06
  		test54.out test55.out test56.out test57.out test58.out \
2102f06
  		test59.out test60.out test61.out test62.out test63.out \
2102f06
! 		test64.out test65.out test66.out test67.out test68.out \
2102f06
! 		test69.out
2102f06
  
2102f06
  SCRIPTS_GUI = test16.out
2102f06
  
2102f06
*** ../vim-7.2.300/src/testdir/test68.in	2009-11-17 17:39:36.000000000 +0100
2102f06
--- src/testdir/test68.in	2009-11-17 15:39:09.000000000 +0100
2102f06
***************
2102f06
*** 0 ****
2102f06
--- 1,56 ----
2102f06
+ Test for text formatting.
2102f06
+ 
2102f06
+ Results of test68:
2102f06
+ 
2102f06
+ STARTTEST
2102f06
+ :so small.vim
2102f06
+ /^{/+1
2102f06
+ :set noai tw=2 fo=t
2102f06
+ gRa b?
2102f06
+ ENDTEST
2102f06
+ 
2102f06
+ {
2102f06
+     
2102f06
+ 
2102f06
+ }
2102f06
+ 
2102f06
+ STARTTEST
2102f06
+ /^{/+1
2102f06
+ :set ai tw=2 fo=tw
2102f06
+ gqgqjjllab?
2102f06
+ ENDTEST
2102f06
+ 
2102f06
+ {
2102f06
+ a  b  
2102f06
+ 
2102f06
+ a    
2102f06
+ }
2102f06
+ 
2102f06
+ STARTTEST
2102f06
+ /^{/+1
2102f06
+ :set tw=3 fo=t
2102f06
+ gqgqo
2102f06
+ a ???
2102f06
+ ENDTEST
2102f06
+ 
2102f06
+ {
2102f06
+ a ?
2102f06
+ }
2102f06
+ 
2102f06
+ STARTTEST
2102f06
+ /^{/+1
2102f06
+ :set tw=2 fo=tcq1 comments=:#
2102f06
+ gqgqjgqgqo
2102f06
+ a b
2102f06
+ #a b?
2102f06
+ ENDTEST
2102f06
+ 
2102f06
+ {
2102f06
+ a b
2102f06
+ #a b
2102f06
+ }
2102f06
+ 
2102f06
+ STARTTEST
2102f06
+ :g/^STARTTEST/.,/^ENDTEST/d
2102f06
+ :1;/^Results/,$wq! test.out
2102f06
+ ENDTEST
2102f06
*** ../vim-7.2.300/src/testdir/test68.ok	2009-11-17 17:39:36.000000000 +0100
2102f06
--- src/testdir/test68.ok	2009-11-17 15:11:26.000000000 +0100
2102f06
***************
2102f06
*** 0 ****
2102f06
--- 1,35 ----
2102f06
+ Results of test68:
2102f06
+ 
2102f06
+ 
2102f06
+ {
2102f06
+ a
2102f06
+ b
2102f06
+ }
2102f06
+ 
2102f06
+ 
2102f06
+ {
2102f06
+ a  
2102f06
+ b  
2102f06
+ 
2102f06
+ a  
2102f06
+ b
2102f06
+ }
2102f06
+ 
2102f06
+ 
2102f06
+ {
2102f06
+ a
2102f06
+ ?
2102f06
+ 
2102f06
+ a
2102f06
+ ?
2102f06
+ }
2102f06
+ 
2102f06
+ 
2102f06
+ {
2102f06
+ a b
2102f06
+ #a b
2102f06
+ 
2102f06
+ a b
2102f06
+ #a b
2102f06
+ }
2102f06
+ 
2102f06
*** ../vim-7.2.300/src/testdir/test69.in	2009-11-17 17:39:36.000000000 +0100
2102f06
--- src/testdir/test69.in	2009-11-17 15:11:26.000000000 +0100
2102f06
***************
2102f06
*** 0 ****
2102f06
--- 1,139 ----
2102f06
+ Test for multi-byte text formatting.
2102f06
+ 
2102f06
+ STARTTEST
2102f06
+ :so mbyte.vim
2102f06
+ :set encoding=utf-8
2102f06
+ ENDTEST
2102f06
+ 
2102f06
+ Results of test69:
2102f06
+ 
2102f06
+ STARTTEST
2102f06
+ /^{/+1
2102f06
+ :set tw=2 fo=t
2102f06
+ gqgqjgqgqo
2102f06
+ XYZ
2102f06
+ abc XYZ?
2102f06
+ ENDTEST
2102f06
+ 
2102f06
+ {
2102f06
+ XYZ
2102f06
+ abc XYZ
2102f06
+ }
2102f06
+ 
2102f06
+ STARTTEST
2102f06
+ /^{/+1
2102f06
+ :set tw=1 fo=tm
2102f06
+ gqgqjgqgqjgqgqjgqgqjgqgqo
2102f06
+ X
2102f06
+ Xa
2102f06
+ X a
2102f06
+ XY
2102f06
+ X Y?
2102f06
+ ENDTEST
2102f06
+ 
2102f06
+ {
2102f06
+ X
2102f06
+ Xa
2102f06
+ X a
2102f06
+ XY
2102f06
+ X Y
2102f06
+ }
2102f06
+ 
2102f06
+ STARTTEST
2102f06
+ /^{/+1
2102f06
+ :set tw=2 fo=tm
2102f06
+ gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo
2102f06
+ X
2102f06
+ Xa
2102f06
+ X a
2102f06
+ XY
2102f06
+ X Y
2102f06
+ aX
2102f06
+ abX
2102f06
+ abcX
2102f06
+ abX c
2102f06
+ abXY?
2102f06
+ ENDTEST
2102f06
+ 
2102f06
+ {
2102f06
+ X
2102f06
+ Xa
2102f06
+ X a
2102f06
+ XY
2102f06
+ X Y
2102f06
+ aX
2102f06
+ abX
2102f06
+ abcX
2102f06
+ abX c
2102f06
+ abXY
2102f06
+ }
2102f06
+ 
2102f06
+ STARTTEST
2102f06
+ /^{/+1
2102f06
+ :set ai tw=2 fo=tm
2102f06
+ gqgqjgqgqo
2102f06
+ X
2102f06
+ Xa?
2102f06
+ ENDTEST
2102f06
+ 
2102f06
+ {
2102f06
+   X
2102f06
+   Xa
2102f06
+ }
2102f06
+ 
2102f06
+ STARTTEST
2102f06
+ /^{/+1
2102f06
+ :set noai tw=2 fo=tm
2102f06
+ gqgqjgqgqo
2102f06
+   X
2102f06
+   Xa?
2102f06
+ ENDTEST
2102f06
+ 
2102f06
+ {
2102f06
+   X
2102f06
+   Xa
2102f06
+ }
2102f06
+ 
2102f06
+ STARTTEST
2102f06
+ /^{/+1
2102f06
+ :set tw=2 fo=cqm comments=n:X
2102f06
+ gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo
2102f06
+ X
2102f06
+ Xa
2102f06
+ XaY
2102f06
+ XY
2102f06
+ XYZ
2102f06
+ X Y
2102f06
+ X YZ
2102f06
+ XX
2102f06
+ XXa
2102f06
+ XXY?
2102f06
+ ENDTEST
2102f06
+ 
2102f06
+ {
2102f06
+ X
2102f06
+ Xa
2102f06
+ XaY
2102f06
+ XY
2102f06
+ XYZ
2102f06
+ X Y
2102f06
+ X YZ
2102f06
+ XX
2102f06
+ XXa
2102f06
+ XXY
2102f06
+ }
2102f06
+ 
2102f06
+ STARTTEST
2102f06
+ /^{/+1
2102f06
+ :set tw=2 fo=tm
2102f06
+ RXa?
2102f06
+ ENDTEST
2102f06
+ 
2102f06
+ {
2102f06
+ 
2102f06
+ }
2102f06
+ 
2102f06
+ STARTTEST
2102f06
+ :g/^STARTTEST/.,/^ENDTEST/d
2102f06
+ :1;/^Results/,$wq! test.out
2102f06
+ ENDTEST
2102f06
*** ../vim-7.2.300/src/testdir/test69.ok	2009-11-17 17:39:36.000000000 +0100
2102f06
--- src/testdir/test69.ok	2009-11-17 15:11:26.000000000 +0100
2102f06
***************
2102f06
*** 0 ****
2102f06
--- 1,142 ----
2102f06
+ Results of test69:
2102f06
+ 
2102f06
+ 
2102f06
+ {
2102f06
+ XYZ
2102f06
+ abc
2102f06
+ XYZ
2102f06
+ 
2102f06
+ XYZ
2102f06
+ abc
2102f06
+ XYZ
2102f06
+ }
2102f06
+ 
2102f06
+ 
2102f06
+ {
2102f06
+ X
2102f06
+ X
2102f06
+ a
2102f06
+ X
2102f06
+ a
2102f06
+ X
2102f06
+ Y
2102f06
+ X
2102f06
+ Y
2102f06
+ 
2102f06
+ X
2102f06
+ X
2102f06
+ a
2102f06
+ X
2102f06
+ a
2102f06
+ X
2102f06
+ Y
2102f06
+ X
2102f06
+ Y
2102f06
+ }
2102f06
+ 
2102f06
+ 
2102f06
+ {
2102f06
+ X
2102f06
+ X
2102f06
+ a
2102f06
+ X
2102f06
+ a
2102f06
+ X
2102f06
+ Y
2102f06
+ X
2102f06
+ Y
2102f06
+ a
2102f06
+ X
2102f06
+ ab
2102f06
+ X
2102f06
+ abc
2102f06
+ X
2102f06
+ ab
2102f06
+ X
2102f06
+ c
2102f06
+ ab
2102f06
+ X
2102f06
+ Y
2102f06
+ 
2102f06
+ X
2102f06
+ X
2102f06
+ a
2102f06
+ X
2102f06
+ a
2102f06
+ X
2102f06
+ Y
2102f06
+ X
2102f06
+ Y
2102f06
+ a
2102f06
+ X
2102f06
+ ab
2102f06
+ X
2102f06
+ abc
2102f06
+ X
2102f06
+ ab
2102f06
+ X
2102f06
+ c
2102f06
+ ab
2102f06
+ X
2102f06
+ Y
2102f06
+ }
2102f06
+ 
2102f06
+ 
2102f06
+ {
2102f06
+   X
2102f06
+   X
2102f06
+   a
2102f06
+ 
2102f06
+   X
2102f06
+   X
2102f06
+   a
2102f06
+ }
2102f06
+ 
2102f06
+ 
2102f06
+ {
2102f06
+   X
2102f06
+   X
2102f06
+ a
2102f06
+ 
2102f06
+   X
2102f06
+   X
2102f06
+ a
2102f06
+ }
2102f06
+ 
2102f06
+ 
2102f06
+ {
2102f06
+ X
2102f06
+ Xa
2102f06
+ Xa
2102f06
+ XY
2102f06
+ XY
2102f06
+ XY
2102f06
+ XZ
2102f06
+ X Y
2102f06
+ X Y
2102f06
+ X Z
2102f06
+ XX
2102f06
+ XXa
2102f06
+ XXY
2102f06
+ 
2102f06
+ X
2102f06
+ Xa
2102f06
+ Xa
2102f06
+ XY
2102f06
+ XY
2102f06
+ XY
2102f06
+ XZ
2102f06
+ X Y
2102f06
+ X Y
2102f06
+ X Z
2102f06
+ XX
2102f06
+ XXa
2102f06
+ XXY
2102f06
+ }
2102f06
+ 
2102f06
+ 
2102f06
+ {
2102f06
+ X
2102f06
+ a
2102f06
+ }
2102f06
+ 
2102f06
*** ../vim-7.2.300/src/version.c	2009-11-17 17:37:34.000000000 +0100
2102f06
--- src/version.c	2009-11-17 17:26:35.000000000 +0100
2102f06
***************
2102f06
*** 683,684 ****
2102f06
--- 683,686 ----
2102f06
  {   /* Add new patch number below this line */
2102f06
+ /**/
2102f06
+     301,
2102f06
  /**/