-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Before, we elided all small sets of unhighlighted lines and then partially elided large sets of unhighlighted lines (favoring the start). In contrast, rustc shows 2 lines of context, split between the start and end of the fold. If there are 3 unhighlighted lines, it just skips folding. This makes a lot more sense. See https://github.com/rust-lang/rust/blob/2627e9f3012a97d3136b3e11bf6bd0853c38a534/compiler/rustc_errors/src/emitter.rs#L1878C17-L1939C18 In contrast to rustc, I made the amount of context a variable to make the intent clearer and to open the door to it being configurable.
- Loading branch information
Showing
3 changed files
with
59 additions
and
103 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.