We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 511b757 commit c396bb0Copy full SHA for c396bb0
src/display/side_by_side.rs
@@ -201,7 +201,10 @@ impl SourceDimensions {
201
//
202
// This is a crude heuristic because it ignores which lines of
203
// the file actually get displayed, so we can still end up
204
- // with some superfluous space
+ // with some superfluous space. It also naively assumes that
205
+ // byte length is the same display length, which is generally
206
+ // OK because byte length will tend to be larger than the
207
+ // display length.
208
let display_width = min(terminal_width, (content_max_width + 4) * 2 + SPACER.len());
209
210
assert!(
0 commit comments