pulsar/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
..
fixtures Clean up tests 2016-12-14 13:30:34 -07:00
integration Do not use the chromedriver wrapper as it spews to stdout 2016-12-13 12:13:47 -08:00
main-process Avoid assertions about application.json in main process test 2017-01-09 11:31:25 -08:00
application-delegate-spec.js Stringify/parse temporary window state to avoid nulling out references 2016-08-09 14:43:38 -06:00
async-spec-helpers.js Wait for reused window's project paths to update in main process test 2016-09-20 16:52:47 -07:00
atom-environment-spec.coffee Clean up temporary files when running specs 2016-12-01 10:48:45 -08:00
atom-paths-spec.js Clean up portable mode, try local .atom before ATOM_HOME 2016-12-11 15:59:24 -08:00
atom-protocol-handler-spec.coffee Fix linter errors 2015-09-18 20:48:50 -06:00
atom-reporter.coffee Throw an error if there is any deprecation in a spec 2016-10-07 10:40:41 +02:00
auto-update-manager-spec.js Skip autoupdater tests on Win32, we don't use electron autoUpdate there 2016-11-29 16:55:14 -08:00
babel-spec.coffee Clean up temporary files when running specs 2016-12-01 10:48:45 -08:00
buffered-node-process-spec.coffee Remove Duplicate Require Statements and Unify Syntax on ' 2016-01-15 14:35:28 -06:00
buffered-process-spec.coffee Switch to process.platform, stop clobbering process var and move windows block 2016-05-03 15:22:13 -07:00
clipboard-spec.coffee
command-installer-spec.coffee Clean up temporary files when running specs 2016-12-01 10:48:45 -08:00
command-registry-spec.coffee Order listeners by reverse registration order 2016-05-01 16:48:09 -07:00
compile-cache-spec.coffee Remove errant stack trace from console 2016-12-01 14:02:11 -08:00
config-spec.coffee Merge pull request #13365 from atom/dg-specs-reliability 2016-12-01 13:24:12 -08:00
context-menu-manager-spec.coffee Unfocus specs 2016-08-25 22:44:57 -04:00
custom-gutter-component-spec.coffee 💚 Adapt specs to pass atom.views in ctors 2015-10-07 15:25:02 -05:00
decoration-manager-spec.coffee Remove unused variables 2016-09-26 20:52:13 +03:00
default-directory-provider-spec.coffee Clean up temporary files when running specs 2016-12-01 10:48:45 -08:00
default-directory-searcher-spec.coffee Remove Duplicate Require Statements and Unify Syntax on ' 2016-01-15 14:35:28 -06:00
deserializer-manager-spec.coffee
dom-element-pool-spec.coffee Prepare DOMElementPool to account for text nodes 2015-10-06 10:02:04 +02:00
fake-lines-yardstick.coffee 🎨 2016-03-25 16:37:01 +01:00
file-system-blob-store-spec.coffee Clean up temporary files when running specs 2016-12-01 10:48:45 -08:00
git-repository-provider-spec.coffee Clean up temporary files when running specs 2016-12-01 10:48:45 -08:00
git-repository-spec.coffee Bypass checkoutHeadForEditor/displays a confirmation dialog by default spec on Windows for reliability 2016-12-02 15:01:06 -08:00
grammars-spec.coffee Clean up temporary files when running specs 2016-12-01 10:48:45 -08:00
gutter-container-component-spec.coffee Fix prepending multiple gutters at once 2016-11-19 12:22:59 -08:00
gutter-container-spec.coffee Destroy a TextEditor's Gutters when it is destroyed 2015-08-21 12:55:22 -07:00
gutter-spec.coffee [Gutter] Fix coffeescript style issues 2015-04-22 07:29:00 -07:00
history-manager-spec.js Remove errant debugger call in spec 2016-12-06 22:30:01 -08:00
jasmine-test-runner.coffee Remove unused variables 2016-09-26 20:52:13 +03:00
keymap-extensions-spec.coffee Basic test for user keymap loaded event 2017-01-05 17:12:02 -08:00
language-mode-spec.coffee Remove extraneous TextEditor setter methods 2016-08-15 16:45:10 -07:00
lines-yardstick-spec.coffee Merge pull request #13453 from atom/mb-ns-integrate-new-display-layer 2016-12-16 10:25:10 -08:00
menu-manager-spec.coffee Fix MenuManager spec that forget to set darin to test macOS behavior 2016-11-29 16:55:14 -08:00
module-cache-spec.coffee Clean up temporary files when running specs 2016-12-01 10:48:45 -08:00
native-compile-cache-spec.coffee Use __dirname in path.resolve for specs 2016-01-13 19:05:38 -08:00
notification-manager-spec.coffee
notification-spec.coffee Remove string detail check 2015-07-07 13:46:53 -07:00
package-manager-spec.coffee Add precondition test 2016-12-02 13:30:24 +01:00
package-spec.coffee Add initialize() hook to packages 2016-11-30 14:27:29 -08:00
package-transpilation-registry-spec.js Fix package-transpilation-registry tests on Win32 2016-11-29 16:55:14 -08:00
pane-axis-element-spec.coffee Correctly (un)subscribe to model events on PaneAxisElement attach/detach 2016-03-28 14:49:26 +02:00
pane-container-element-spec.coffee Allow element to work without attaching it to DOM 2016-03-28 16:40:39 +02:00
pane-container-spec.coffee Test that destroyed panes aren't included in PaneContainer::getPanes() 2016-09-12 18:03:40 -07:00
pane-element-spec.coffee Allow atom-pane to be shrunk independently of its contents' width 2016-05-30 14:49:29 +02:00
pane-spec.coffee Prevent text from leaving fixture modified 2016-11-29 16:55:14 -08:00
panel-container-element-spec.coffee Remove unused variables 2016-09-26 20:52:13 +03:00
panel-container-spec.coffee
panel-element-spec.coffee Don't use atom.views global in PanelElement 2015-10-07 15:25:00 -05:00
panel-spec.coffee
project-spec.coffee Clean up temporary files when running specs 2016-12-01 10:48:45 -08:00
reopen-project-menu-manager-spec.js is to === 2016-10-27 10:57:48 -07:00
sample-with-comments.js Pass AppDelegate to Workspace, Pane instead of bound functions 2015-10-13 18:54:48 -06:00
selection-spec.coffee Avoid using torn-down properties in specs 2017-01-02 11:55:41 -08:00
spec-helper-platform.coffee
spec-helper.coffee Throw an error if there is any deprecation in a spec 2016-10-07 10:40:41 +02:00
squirrel-update-spec.coffee Clean up temporary files when running specs 2016-12-01 10:48:45 -08:00
state-store-spec.js Add ability to clear IndexedDB state object store 2016-02-11 19:56:25 -08:00
style-manager-spec.js Clean up temporary files when running specs 2016-12-01 10:48:45 -08:00
styles-element-spec.coffee Transform deprecated shadow DOM selectors in StyleManager 2016-10-07 10:40:41 +02:00
task-spec.coffee Remove unused variables 2016-09-26 20:52:13 +03:00
text-editor-component-spec.js Always reserve two digits on the line number gutter 2017-01-10 18:14:50 -08:00
text-editor-element-spec.coffee Make each atom-text-editor keep a consistent hidden input node for its lifetime 2016-12-08 16:05:45 -08:00
text-editor-presenter-spec.coffee Always reserve two digits on the line number gutter 2017-01-10 18:14:50 -08:00
text-editor-registry-spec.js Handle null grammars consistently, building placeholder lines on-demand 2016-10-12 09:04:41 +02:00
text-editor-spec.coffee Emit editor destroyed event after releasing the editor's buffer 2017-01-03 15:18:01 -08:00
text-utils-spec.coffee Implement isWrapBoundary for DisplayLayer 2016-03-18 18:30:35 +01:00
theme-manager-spec.coffee Clean up temporary files when running specs 2016-12-01 10:48:45 -08:00
time-reporter.coffee Remove unused variables 2016-09-26 20:52:13 +03:00
title-bar-spec.coffee Test that updateWindowSheetOffset can be called 2016-08-02 16:16:27 -06:00
token-iterator-spec.coffee Use TokenizedBuffer.prototype.tokenizedLineForRow conservatively 2016-10-12 09:04:41 +02:00
tokenized-buffer-iterator-spec.js Return scopes prepended with --syntax from TokenizedBufferIterator 2016-10-07 10:40:41 +02:00
tokenized-buffer-spec.coffee Merge branch 'master' into as-deprecate-shadow-dom 2016-10-17 12:06:00 +02:00
tooltip-manager-spec.coffee 👕 2016-12-22 16:39:40 -08:00
typescript-spec.coffee Use source-map-support to handle stack trace conversion 2015-08-19 17:55:29 -07:00
update-process-env-spec.js Replace "osx" to "macOS" 2016-12-04 15:28:43 -03:00
view-registry-spec.coffee Test for getElement. 2016-03-01 10:56:03 -05:00
window-event-handler-spec.coffee Project and Window-Event-Handler spec pass on Win32 2016-11-29 16:55:14 -08:00
workspace-element-spec.coffee Clean up temporary files when running specs 2016-12-01 10:48:45 -08:00
workspace-spec.coffee Fix title bar tests on non-macOS systems 2016-12-19 19:43:15 -08:00