Skip to content

Escaped spaces in tmux’s terminfo

 1 min Twelve escaped spaces interrupted tmux’s SGR capability; removing them restored the intended terminal control sequence.
Published

May 16, 2018

I found twelve \s escapes embedded in tmux’s sgr capability in the ncurses terminfo source. They were not indentation. They described spaces to emit as part of the terminal control sequence.

The submitted patch removed those escapes from the continued line. The numeric parameter that followed them could then be part of the sequence as intended.

The distinction is easy to miss in a long declarative file. Whitespace arranging the source for a reader and an escape requesting literal whitespace have different effects, even when the surrounding line looks mostly like punctuation.

Thomas Dickey said the diagnosis looked correct but closed the PR because ncurses accepted changes through its mailing list. The next snapshot’s NEWS entry subsequently credited my whitespace report as part of its tmux SGR correction.