Terminal borders that don't cost a cell

vinhnx 170 points 79 comments November 13, 2026
www.joshka.net · View on Hacker News

Discussion Highlights (20 comments)

montroser

I appreciate the innovation happening with TUIs in these modern times. But, aesthetically, I have to say, I like my borders to have some breathing room, which gets lost in this particular treatment.

cobychapple

Would be cool to get borders and lines out of copy/paste

tptacek

I love this work and everything else Ratatui does but I have to ask: if you're changing the terminal protocol and the terminal itself to do this, why not do something more ambitious; a full monospaced information-dense UI framework, a terminal designed for user interfaces, rather than one designed to replicate the limitations of dumb terminals?

0c3ca83

What if, dare I say it, we just served HTML over ssh, and let the browser render a proper UI, instead of layering hacks on top of hacks?

joouha

A much better alternative to this would be to for more terminal emulators to implement overstrike mode (DECSET 20, as available on the VK100). That way you could just draw border characters over existing text cells to achieve the same thing. Unfortunately mintty is the only terminal emulator I'm aware of which supports overstrike [0], as this would open up a world of new possibilities for TUI apps if more widely supported. [0] https://github.com/mintty/mintty/wiki/CtrlSeqs#overstrike

hnlmorg

Why wouldn’t this work over tmux? The authors claims don’t make a whole lot of sense because if this were a cell property, like any other CSI, then it’ll get rendered in the terminal emulator exactly as intended. And we know this because none of the other CSI sequences get garbled over multiplextors. But for there to be a dedicated section on how multiplexors wouldn’t work suggests to me that the authors already tried this via tmux. So I’m left wondering what they’ve done with the implementation of this to make that a problem. I spotted they are using DCS sequences. But even that shouldn’t be an issue itself.

ganelonhb

This is gorgeous and I need it in trunk for both kitty and ghostty

kevin_thibedeau

How much RAM does this use?

dead_hn_theory

There's a nice thread about this on lobsters, but the author is getting piled on.

joshka

The big thing to note on this is one last caveat. I don't care about the actual spec on this - happy for that to be whatever works. I care more about the capability than how it's done / implemented. There's some bits that feel like they probably make sense to consider doing other ways, like how border placement works (inside, outside, on the border, etc.), and how the filling works - to make borders incorporate external or internal padding.

kodoman

This is pretty cool but this does feel like we are just reinventing another GUI display at this point. I don't generally like TUI's and think one gets more flexibility with raw text interfaces and being able to glue things together is more important then them looking nice. I think less fancy out put is better to be honest.

nmstoker

Love this. And the people who like more space can opt for that (this doesn't look things in).

charles_f

> If that bothers you, feel free to close the tab. I probably missed on something, but I stopped there

octoberfranklin

Having markdown tables render with zero-cell spacing (use underlines for horizontal and different background shades for vertical) is just one of the billion reasons I will never, ever, ever go back to closed-source coding agents.

TacticalCoder

A pet peeve of mine is that most people / WM get "useless gaps" wrong. You do want a gap between two terminals because otherwise there are times where things can get really confusing (where you don't know what belong to which terminal / window). So the "borderless" (0 pixels) / zero "useless gaps" simply are confusing and... Wrong. But then people who do use useless gap, as in TFA, get it wrong too: they typically add gaps near the monitor's edges. Yeah. But no. Sorry but my monitor's edge is a perfectly fine gap. I don't risk mistaking it for anything. So I modified my WM (the Awesome WM) to do proper "useless gaps" computation and remove the ones that really are useless: and that'd be those near the monitor's physical border. I mean: nearly everybody gets it wrong, but it's not complicated to get it right, is it? P.S: even the terminology is wrong... People calling those "useless gaps" haven't got a clue: they are useful. The only useless ones are the one on the monitor's edge (if your monitor has physical edges, which it probably does).

movingimage

“That don’t cost a cell.” Can’t stand AI bro speak.

movingimage

“….that don’t cost a cell.” How much do I hate AI hustle bro passive riddle writing.

favori995749721

One benefit worth calling out: the box-drawing fallback is worse than it looks for CJK users. U+2500-257F and the half/full block elements are East Asian "Ambiguous" in UAX #11, so in a terminal configured to render ambiguous as double width (xterm's cjkWidth, iTerm2's checkbox) every line glyph takes two cells and the whole frame lands in the wrong place. Cell borders aren't text, so that failure class just disappears. The part I'd want specced early: borders are per-cell, but cells aren't per-grapheme. A CJK char owns two cells plus a continuation placeholder, and combining marks or ZWJ emoji sequences own zero-or-more depending on whose wcwidth table you ask, so app and terminal routinely disagree across Unicode versions. Today that shows up as a vertical bar one column off; with cell borders it becomes a line that stops short of the corner. Does the border attach to the cell or to the grapheme cluster?

krautburglar

Why do you people have to ruin terminals? If you wanted a web browser, we already have those, and they already have borders.

CGamesPlay

I am in general against the big push to fit GUI interfaces into the tty, but I have to say that this feature looks genuinely good. Vim will look great with this.

Semantic search powered by Rivestack pgvector
12,728 stories · 120,417 chunks indexed