lkundrak / rpms / vim

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