changeset 3705:2b4b6185054f v7.3.612

updated for version 7.3.612 Problem: Auto formatting messes up text when 'fo' contains "2". (ZyX) Solution: Decrement "less_cols". (Tor Perkins)
author Bram Moolenaar <bram@vim.org>
date Wed, 25 Jul 2012 16:10:03 +0200
parents 5d6c73eb5333
children 1857ea1fddf6
files src/misc1.c src/testdir/test68.in src/testdir/test68.ok src/version.c
diffstat 4 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -1329,6 +1329,7 @@ open_line(dir, flags, second_line_indent
 	    for (i = 0; i < padding; i++)
 	    {
 		STRCAT(leader, " ");
+		less_cols--;
 		newcol++;
 	    }
 	}
--- a/src/testdir/test68.in
+++ b/src/testdir/test68.in
@@ -94,6 +94,16 @@ ENDTEST
 }
 
 STARTTEST
+/mno pqr/
+:setl tw=20 fo=an12wcq comments=s1:/*,mb:*,ex:*/
+A vwx yz
+ENDTEST
+
+/* abc def ghi jkl 
+ *    mno pqr stu
+ */
+
+STARTTEST
 /^#/
 :setl tw=12 fo=tqnc comments=:#
 A foobar
--- a/src/testdir/test68.ok
+++ b/src/testdir/test68.ok
@@ -57,6 +57,12 @@ a b
 { 1aa ^^2bb }
 
 
+/* abc def ghi jkl 
+ *    mno pqr stu 
+ *    vwx yz
+ */
+
+
 # 1 xxxxx
 #   foobar
 
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    612,
+/**/
     611,
 /**/
     610,