mirror of
https://github.com/walles/moar.git
synced 2024-11-30 02:34:13 +03:00
Left pad line numbers
Fixes a regression, this is what it used to look like and should have looked like all the time.
This commit is contained in:
parent
da47a1730e
commit
dc070cad75
@ -122,6 +122,7 @@ func (p *Pager) _AddLine(fileLineNumber *int, numberPrefixLength int, screenLine
|
||||
lineNumberString := ""
|
||||
if numberPrefixLength > 0 && fileLineNumber != nil {
|
||||
lineNumberString = formatNumber(uint(*fileLineNumber))
|
||||
lineNumberString = fmt.Sprintf("%*s", numberPrefixLength-1, lineNumberString)
|
||||
if len(lineNumberString) > numberPrefixLength {
|
||||
panic(fmt.Errorf(
|
||||
"lineNumberString <%s> longer than numberPrefixLength %d",
|
||||
|
Loading…
Reference in New Issue
Block a user