Skip to content
This repository has been archived by the owner on Feb 10, 2024. It is now read-only.

Commit

Permalink
xtext: Fix poor performance with nick indent enabled
Browse files Browse the repository at this point in the history
This fixes xtext re-rendering multiple times when the
indent width is not sufficient

Fixes #1364
Closes #1367
  • Loading branch information
RichardHitt authored and TingPing committed May 18, 2015
1 parent ff9c0db commit f7bea16
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/fe-gtk/xtext.c
Expand Up @@ -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;

Expand Down

0 comments on commit f7bea16

Please sign in to comment.