mirror of
https://github.com/atom/atom.git
synced 2026-01-25 23:08:18 -05:00
Pass maxDigits to labelFn
This commit is contained in:
@@ -3236,7 +3236,7 @@ class LineNumberGutterComponent {
|
||||
number = softWrapped ? '•' : bufferRow + 1
|
||||
number = NBSP_CHARACTER.repeat(maxDigits - number.length) + number
|
||||
} else {
|
||||
number = this.props.labelFn({bufferRow, screenRow, foldable, softWrapped})
|
||||
number = this.props.labelFn({bufferRow, screenRow, foldable, softWrapped, maxDigits})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4227,6 +4227,7 @@ class TextEditor {
|
||||
// * `screenRow` {Number} indicating the zero-indexed screen index.
|
||||
// * `foldable` {Boolean} that is `true` if a fold may be created here.
|
||||
// * `softWrapped` {Boolean} if this screen row is the soft-wrapped continuation of the same buffer row.
|
||||
// * `maxDigits` {Number} the maximum number of digits necessary to represent any known screen row.
|
||||
// * `onMouseDown` (optional) {Function} to be called when a mousedown event is received by a line-number
|
||||
// element within this `type: 'line-number'` {Gutter}. If unspecified, the default behavior is to select the
|
||||
// clicked buffer row.
|
||||
|
||||
Reference in New Issue
Block a user