-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add wrapping behaviour to code labels (#116)
Our error reporter had no wrapping behaviour for code labels: they would happily go as far right as they wanted, often overflowing the assumed width of the terminal they are being printed on. This PR changes that behaviour in two ways: - Labels are no longer forced to be right-positioned to the code span they refer to. If it helps to keep them on one line, we now position them to the left or centred (with this order of preference). - If they would necessarily overflow the maximum allowed width, we perform text wrapping. Getting this right was... tricky. But we have a fairly extensive collection of error messages in our UI tests and the new version seems to work as expected.
- Loading branch information
1 parent
18cd144
commit 44cad26
Showing
44 changed files
with
255 additions
and
154 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.