-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
messages: replace tabs with spaces in open_stream() (#151)
The tabs complicate the internal book-keeping because "\t12" has 3 characters but is printed to the terminal with a varying number of spaces (depending on the user's tabwidth). For the pipe reader used in open_stream(), this issue manifested as a bug where lines containing tabs would result in multiple lines being printed (instead of just the last one), which breaks the "ephemeral" aspect of the stream. Note that this discovery implies that we should probably revisit this tab issue in more places; in particular, the Printer does multiple comparisons between the len() of the text and the terminal width, so if the text has tabs that comparison will be incorrect. However, this commit aims only to fix the (unreleased) behavior of showing subprocess output as ephemeral messages inside open_stream().
- Loading branch information
Showing
3 changed files
with
59 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters