diff src/edit.c @ 3650:d258a0c5c38a v7.3.585

updated for version 7.3.585 Problem: Calling changed_bytes() too often. Solution: Move changed_bytes() out of a loop. (Tor Perkins)
author Bram Moolenaar <bram@vim.org>
date Fri, 06 Jul 2012 13:36:48 +0200
parents 7e3fedfc3d08
children f07475816079
line wrap: on
line diff
--- a/src/edit.c
+++ b/src/edit.c
@@ -6350,10 +6350,8 @@ internal_format(textwidth, second_indent
 			 * add the additional whitespace needed after the
 			 * comment leader for the numbered list.  */
 			for (i = 0; i < padding; i++)
-			{
 			    ins_str((char_u *)" ");
-			    changed_bytes(curwin->w_cursor.lnum, leader_len);
-			}
+			changed_bytes(curwin->w_cursor.lnum, leader_len);
 		    }
 		    else
 		    {