summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorRichardHitt <rbh00@netcom.com>2015-05-18 06:31:00 -0400
committerTingPing <tingping@tingping.se>2015-05-18 06:31:00 -0400
commitf7bea16e37342d752568723d92ce3eca9e4a972a (patch)
treeb03c7e8d0b96a27f5dcd842205911bb7e8934950 /src
parentff9c0dbd5ec9f45cd435a099c17756e0c4759b98 (diff)
xtext: Fix poor performance with nick indent enabled
This fixes xtext re-rendering multiple times when the
indent width is not sufficient

Fixes #1364
Closes #1367
Diffstat (limited to 'src')
-rw-r--r--src/fe-gtk/xtext.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c
index 121f35a3..d541aa87 100644
--- a/src/fe-gtk/xtext.c
+++ b/src/fe-gtk/xtext.c
@@ -4671,7 +4671,9 @@ gtk_xtext_append_indent (xtext_buffer *buf,
 		space = 0;
 
 	/* do we need to auto adjust the separator position? */
-	if (buf->xtext->auto_indent && ent->indent < MARGIN + space)
+	if (buf->xtext->auto_indent &&
+		 buf->indent < buf->xtext->max_auto_indent &&
+		 ent->indent < MARGIN + space)
 	{
 		tempindent = MARGIN + space + buf->xtext->space_width + left_width;