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