Terminal box-drawing characters consume rows and columns, constrain where lines can sit, and become part of copied text. A proposed alternative, “cell borders,” draws lines on cell edges as visual attributes rather than characters. In a Ratatui tiling-window demo running on a patched Ghostty, borders outline panes without reducing their content area; tabs sit on pane edges, text fields are underlined directly beneath their text, and one-row buttons can have rounded outlines. The same approach adds gridlines and average lines to dense braille charts without sacrificing graph cells. Borders also make panels and popups clearer, though they are omitted when copying text, which avoids stray box characters but means the borders themselves cannot be copied.
The protocol stores up to twelve configurable line segments per cell, with options for color, width, placement, and style. Adjacent segments merge; conflicts resolve by priority, then width, then a consistent directional rule, allowing focused panes to retain their outlines. A compact DCS command sets borders while text is printed, with additional commands for changing existing cells and checking terminal support. Unsupported terminals can ignore the commands, allowing applications to fall back to box characters and reserve space as usual. Borders follow cells through scrolling, erasing, and reflow; multiplexers must understand the protocol to preserve them correctly, or should suppress it and trigger fallback. The Ghostty implementation uses shared border sets and fits cell IDs into existing padding, so cells do not grow and terminals without borders incur no added storage.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.