appended lines were scheduled with a timer (REFRESH_TIMEOUT * 2 where REFRESH_TIMEOUT is 20), which effectively adds ~40ms before draw in this path. I changed that specific path to render on the next idle cycle (g_idle_add) so locally echoed sent messages appear sooner.

This commit is contained in:
2026-02-17 14:26:02 -07:00
parent 6025195234
commit eb112f9cd7

View File

@@ -5426,10 +5426,11 @@ gtk_xtext_append_entry (xtext_buffer *buf, textentry * ent, time_t stamp)
g_source_remove (buf->xtext->io_tag);
buf->xtext->io_tag = 0;
}
buf->xtext->add_io_tag = g_timeout_add (REFRESH_TIMEOUT * 2,
(GSourceFunc)
gtk_xtext_render_page_timeout,
buf->xtext);
/* Render new lines as soon as the UI is idle to avoid a noticeable
* delay between pressing Enter and seeing your own message. */
buf->xtext->add_io_tag = g_idle_add ((GSourceFunc)
gtk_xtext_render_page_timeout,
buf->xtext);
}
}
if (buf->scrollbar_down)