|
|
|
@ -201,7 +201,10 @@ impl SourceDimensions {
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// This is a crude heuristic because it ignores which lines of
|
|
|
|
// This is a crude heuristic because it ignores which lines of
|
|
|
|
// the file actually get displayed, so we can still end up
|
|
|
|
// the file actually get displayed, so we can still end up
|
|
|
|
// with some superfluous space
|
|
|
|
// with some superfluous space. It also naively assumes that
|
|
|
|
|
|
|
|
// byte length is the same display length, which is generally
|
|
|
|
|
|
|
|
// OK because byte length will tend to be larger than the
|
|
|
|
|
|
|
|
// display length.
|
|
|
|
let display_width = min(terminal_width, (content_max_width + 4) * 2 + SPACER.len());
|
|
|
|
let display_width = min(terminal_width, (content_max_width + 4) * 2 + SPACER.len());
|
|
|
|
|
|
|
|
|
|
|
|
assert!(
|
|
|
|
assert!(
|
|
|
|
|