Ben Ogle
6e049dd173
Fix tests in editor
2013-11-06 14:13:09 -08:00
Kevin Sawicki
9f5e913804
Update remaining selected class names to fold-selected
2013-11-06 09:55:53 -08:00
Kevin Sawicki
383a724144
Update class name to new fold-selected
2013-11-06 09:50:06 -08:00
Kevin Sawicki
90c21906a4
Add fold- prefix to selected class name
...
This prevents interference with the base selected class
which adds a noticeable blur to folded lines that are selected
when using dark syntax and light ui.
2013-11-06 09:49:18 -08:00
Kevin Sawicki
287f1984db
Update width in chars when editor's size changes
...
Register an overflowchanged event listener on the editor's scroll view
and update the width in chars when this event fires.
Closes #928
Closes #961
Closes #993
2013-11-04 18:12:17 -08:00
Kevin Sawicki
b8680be6c6
Update writeSync spies
2013-11-01 08:46:03 -07:00
Kevin Sawicki
0264fd6be5
Rename writeSync to writeFileSync
2013-11-01 08:46:03 -07:00
Kevin Sawicki
9c79e39401
Upgrade to fs-plus@0.4.0
2013-11-01 08:46:03 -07:00
Kevin Sawicki
ebb7a2637a
Upgrade to fs-plus@0.3.0
2013-11-01 08:46:03 -07:00
Ben Ogle
d150170e5b
Fix gutter rendering when there are folds
...
Fixes #1059
2013-10-31 12:54:21 -07:00
Kevin Sawicki
3b05b40d66
Update package names for new language- prefix
2013-10-22 09:01:30 -07:00
Cheng Zhao
05550717e2
Use temp.dir to replace '/tmp' in specs.
2013-10-21 21:36:08 +08:00
Kevin Sawicki
069208975c
Add proper invisibles in empty lines with indent guide
...
This fixes a regression where multiple end of line invisibles were
displayed on empty lines when the indent guide was also enabled.
The invisibles array used to be shifted and not it isn't but the
entire array was still being iterated over causing extra invisibles
to be added to the line.
2013-10-17 18:31:59 -07:00
probablycorey
92c6ad66eb
Rename Project::open to Project::openSync
...
…and Project::openAsync to Project::open
2013-10-11 10:57:09 -07:00
probablycorey
b0e9b4b81f
Rename RootView.open to RootView.openSync
2013-10-11 10:55:10 -07:00
Ben Ogle
2c2661da11
Fix hiddenInput offset calculation
...
Regression from the speedup stuff
2013-10-09 16:18:34 -07:00
Ben Ogle
9c6353977f
Rework the api using native methods. This is 🐎
...
editor.300-line-file.gutter-api.getLineNumberElementsForClass.DOM: 3 / 20000 = 0.00015ms
editor.300-line-file.gutter-api.getLineNumberElement.DOM: 8 / 20000 = 0.0004ms
editor.300-line-file.gutter-api.toggle-class: 17 / 2000 = 0.0085ms
editor.300-line-file.gutter-api.find-then-unset.single-class: 3 / 200 = 0.015ms
editor.300-line-file.gutter-api.find-then-unset.multiple-class: 9 / 200 = 0.045ms
2013-10-07 14:57:45 -07:00
Ben Ogle
1ff97fc21a
Add getLineNumbersForClass()
...
Also clean up and use klass
2013-10-07 13:57:00 -07:00
Ben Ogle
32329070c2
Add a simple gutter api for adding/removing classes
2013-10-07 13:31:31 -07:00
Ben Ogle
785c71daf8
💄
2013-10-07 10:29:02 -07:00
Ben Ogle
a50e948a90
Remove log lines
2013-10-07 10:28:12 -07:00
Ben Ogle
f1cf8496f8
Fix test, use bufferRowsFOrScreenRowsProperly
2013-10-07 10:28:11 -07:00
Ben Ogle
b4afc24ee8
Most of the tests work
2013-10-07 10:28:11 -07:00
Ben Ogle
2394f25b92
Add the leftPixel cache back in
2013-10-07 10:28:09 -07:00
Ben Ogle
914288ab86
Wrap each char in a span; compute left position by measuring each span.
...
This is is faster and simpler than the old method. Running each function
20,000 times yielded these results:
Old: 3750ms
This method: 1523ms
By looking up each char's width in a dict: 29ms
2013-10-07 10:28:08 -07:00
Kevin Sawicki
e2fb2fdae5
Set font size and family directly on editor element
...
Previously this was set via a style tag which ate up a lot of spec
time and seemed to be functionally equivalent to just setting the
style directly on the element instead of finding and adding/removing
style tags.
2013-10-03 09:38:42 -07:00
Kevin Sawicki
3189347899
Use window height to determine number of lines to render
...
This prevents the editor from displaying empty lines when a view is hidden
and the editor suddenly has more vertical space available to fill.
2013-10-01 15:35:08 -07:00
Kevin Sawicki
e2daef477c
Return false if either character is whitespace
2013-09-27 16:00:24 -07:00
Kevin Sawicki
e5b9b1f3cf
Favor the word when double clicking between word/non-word
...
Closes #523
2013-09-27 16:00:24 -07:00
Kevin Sawicki
2a2750862a
Add failing spec
2013-09-25 16:24:51 -07:00
Kevin Sawicki
fa6e85a522
💄 Require Editor and Range from atom
2013-09-20 17:06:30 -07:00
Kevin Sawicki
5a9972b370
Update editor width is chars when soft wrap is toggled
...
Closes #858
2013-09-20 17:04:21 -07:00
Kevin Sawicki
d46891caf0
Rename atom-api require to atom
2013-09-20 10:03:02 -07:00
Kevin Sawicki
3c94ca4b9e
Use relative paths in spec requires
2013-09-20 10:02:20 -07:00
Kevin Sawicki
71b74c466e
Remove unused requires
2013-09-20 10:02:19 -07:00
Cheng Zhao
666d202eb6
Add spec for syncing cursorView and hiddenInput's position.
2013-09-16 11:03:40 +08:00
Kevin Sawicki
ca3fff8a94
💄 correct typo in method name
2013-09-04 14:01:46 -07:00
Kevin Sawicki
eaf80a0194
Rename softWrapColumn to editorWidthInChars
2013-08-23 18:09:17 -07:00
Kevin Sawicki
3f848606ee
Use setEditorWidthInChars to resize editor
...
This makes the comparisons for the soft wrap column more sane.
2013-08-23 18:09:17 -07:00
Kevin Sawicki
cbd4fab8f2
Emit event from display buffer when soft wrap changes
...
This allows the editor to be reactive to the edit session
and always respect the edit session's current value when
initially opened.
2013-08-23 18:09:16 -07:00
Kevin Sawicki
5001c6e84e
Enable soft wrap explicitly in specs
...
This is required now that the soft wrap setting and soft wrap
column are decoupled.
2013-08-23 18:09:16 -07:00
Kevin Sawicki
a4411ab2ca
Update specs for resize handler changes
2013-08-23 18:09:16 -07:00
Kevin Sawicki
5ea8c6c27b
Don't store soft wrap column on EditSession
...
This removes duplicate state between the edit session and
display buffer.
2013-08-23 18:09:16 -07:00
Kevin Sawicki
da1e5f5c10
Always update the soft wrap column when the window resizes
...
This allows the edit session and display buffer to always be
notified of soft wrap column changes regardless of their initial
soft wrap state.
2013-08-23 18:09:16 -07:00
Kevin Sawicki
a7a1244599
Flatten spec directory
2013-08-19 20:13:58 -07:00