Files
atom/spec
Christopher Chedeau ef7ce7cd3a Always reserve two digits on the line number gutter
We are working on a feature that changes the content of the editor when you mouse over some things and it makes the UI jump when going from 1 line to > 10. This makes the UI feel really bad.

I've looked at Sublime and the 1-9 state is the same as 1-99, only when you reach 100 lines then it jumps. I think that it is a better behavior as you want to minimize jumps as much as possible and it is extremely likely that you are going to hit the 9-10 lines threshold.

![](http://g.recordit.co/ABIlZf5eTx.gif)

While this is being reviewed and until the new version shipped, we are going to monkeypatch Atom in order to get this feature.

```js
var presenter = atom.textEditors.editors.entries().next().value[0].presenter.__proto__;
var old_updateLineNumberGutterState = presenter.updateLineNumberGutterState;
presenter.updateLineNumberGutterState = function() {
  var res = old_updateLineNumberGutterState.apply(this, arguments);
  this.lineNumberGutter.maxLineNumberDigits = Math.max(2, this.lineNumberGutter.maxLineNumberDigits);
  return res;
};
```

Released under CC0
2017-01-10 18:14:50 -08:00
..
2016-12-14 13:30:34 -07:00
2016-08-25 22:44:57 -04:00
🎨
2016-03-25 16:37:01 +01:00
2016-10-27 10:57:48 -07:00
2016-09-26 20:52:13 +03:00
2016-09-26 20:52:13 +03:00
👕
2016-12-22 16:39:40 -08:00
2016-03-01 10:56:03 -05:00