GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
text_art

text_art: Support newlines in text_widget.

The text_art widget now correctly handles newlines, enabling multiline text display.

The text_art widget has been updated to properly handle newline characters by splitting input into multiple lines. This change is a prerequisite for a follow-up patch that will display program source lines within a tree widget.

In Details

The text_art::text_widget has been refactored to support multiline text. Previously, it treated input as a single line. The changes in widget.cc and widget.h introduce a new m_lines field and adjust calc_req_size and paint_to_canvas to iterate over these lines. A new selftest verifies this multiline behavior.

For Context
text_art
A GCC internal library for rendering text-based user interfaces within the compiler itself, often used in debugging or introspection tools.
widget
A reusable component within a graphical or text-based user interface, responsible for displaying and handling user interactions for a specific element.
Filed Under: text_artuirefactor