<p>I just tried the patch and it doesn't seem to work for me, if I change a type name other occurrences of it don't change:</p>

<div class="highlight highlight-source-c"><pre><span class="pl-k">typedef</span> <span class="pl-k">int</span> bar;

bar z;</pre></div>

<p>if you change the name of the typedef, the typedef itself gets re-highlighted when the cursor blinks (roughly a second later), but the usage below don't.</p>

<p>However, instead of re-colorizing everything maybe we could only colorize up to the end of the visible area, which would mitigate (or even eradicate?) the slowness:</p>

<div class="highlight highlight-source-diff"><pre><span class="pl-c1">diff --git a/src/editor.c b/src/editor.c</span>
index 1336588..cfbfbe9 100644
<span class="pl-md">--- a/src/editor.c</span>
<span class="pl-mi1">+++ b/src/editor.c</span>
<span class="pl-mdr">@@ -4682,12 +4682,20 @@</span> on_editor_scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer user_d
 static gboolean editor_check_colourise(GeanyEditor *editor)
 {
     GeanyDocument *doc = editor->document;
<span class="pl-mi1">+    gint start_line, end_line, start, end;</span>

     if (!doc->priv->colourise_needed)
         return FALSE;

<span class="pl-mi1">+    start_line = SSM(editor->sci, SCI_GETFIRSTVISIBLELINE, 0, 0);</span>
<span class="pl-mi1">+    end_line = start_line + SSM(editor->sci, SCI_LINESONSCREEN, 0, 0);</span>
<span class="pl-mi1">+    start_line = SSM(editor->sci, SCI_DOCLINEFROMVISIBLE, start_line, 0);</span>
<span class="pl-mi1">+    end_line = SSM(editor->sci, SCI_DOCLINEFROMVISIBLE, end_line, 0);</span>
<span class="pl-mi1">+    start = sci_get_position_from_line(editor->sci, start_line);</span>
<span class="pl-mi1">+    end = sci_get_line_end_position(editor->sci, end_line);</span>
<span class="pl-mi1">+</span>
     doc->priv->colourise_needed = FALSE;
<span class="pl-md">-    sci_colourise(editor->sci, 0, -1);</span>
<span class="pl-mi1">+    sci_colourise(editor->sci, start, end);</span>

     /* now that the current document is colourised, fold points are now accurate,
      * so force an update of the current function/tag. */</pre></div>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany/pull/575#issuecomment-164031773">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ8l9W3mdhzixN9pXJb9rfqXsJDiwks5pOx9XgaJpZM4FYNzd.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/pull/575#issuecomment-164031773"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>