From 3aed51cdc120cae73628fcce511c9124614f5e51 Mon Sep 17 00:00:00 2001 From: Thomas Otto Date: Wed, 19 Jan 2022 01:33:09 +0100 Subject: Center Align numbers right-ish (#883) There is no such thing as "Center Align" with discrete terminal cells. In some cases a decision has to be made whether to use the left or the right cell, e.g. when centering one char in 4 cells: "_X__" or "__X_". The format!() center/^ default is left, but when padding numbers these are now aligned to the right if required. Strings remain left-aligned. --- src/cli.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cli.rs') diff --git a/src/cli.rs b/src/cli.rs index cdd8596..233adc9 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -162,9 +162,9 @@ To display line numbers, use --line-numbers. Line numbers are displayed in two columns. Here's what it looks like by default: - 1 ⋮ 1 │ unchanged line - 2 ⋮ │ removed line - ⋮ 2 │ added line + 1 ⋮ 1 │ unchanged line + 2 ⋮ │ removed line + ⋮ 2 │ added line In that output, the line numbers for the old (minus) version of the file appear in the left column, and the line numbers for the new (plus) version of the file appear in the right column. In an -- cgit v1.2.3