Nathan Sobo
2548891b99
Clear the mousewheelScreenRow even if the event does not cause scrolling
...
If a mousewheel event is triggered when the editor can't be scrolled,
we still want to clear the mouseWheelScreenRow. This is typically done
when we stop scrolling, but if we never start scrolling it will never
happen. This commit adds another timeout to cover that case.
2014-05-31 18:36:59 +09:00
Nathan Sobo
115a7e1dfb
💄 Give mousewheel events their own describe block
2014-05-31 18:20:27 +09:00
Nathan Sobo
0043072ecf
Only preserve mouseWheelScreenRow if it's out of the rendered row range
...
Fixes #2429 , #2443
Otherwise, it's possible to duplicate lines. If a line is in the
rendered row range and it's not in the set of lines returned by the
editor, we should remove it no matter what. Line preservation is only
intended for lines that are out of view.
2014-05-31 08:56:57 +09:00
Nathan Sobo
89c57b6d52
Only set the mouseWheelScreenRow when scrolling vertically
...
When we handle a mousewheel event targeting a line or line number, we
assign the mousewheelScreenRow to prevent the removal of the target
node, which interferes with velocity scrolling.
However, the ::mousewheelScreenRow is only cleared 100ms after we stop
scrolling vertically. This means that if we're only scrolling
horizontally, it's never cleared. This causes the line node associated
with this screen row to hang around longer until the mousewheel screen
row is cleared again, which is not what we want.
This commit only assigns the ::mousewheelScreenRow when scrolling
vertically, so we can be sure it will be cleared.
2014-05-31 08:56:57 +09:00
probablycorey
c9ae9e11c1
Reword specs
2014-05-28 16:34:42 -07:00
probablycorey
7f57a094f6
Determine softTab state after the buffer is tokenized.
2014-05-28 16:31:00 -07:00
probablycorey
b7df08cbdd
Add spec to re-emit the tokenized event when the grammar is changed
2014-05-28 16:10:02 -07:00
probablycorey
89dc5f26ad
Only emit the tokenized event after the first full tokenization
2014-05-28 15:56:08 -07:00
probablycorey
2c60b0463e
Use tokenized buffer created by editor
2014-05-28 15:46:26 -07:00
probablycorey
c56ac70181
Add tokenized event to tokenized buffer
2014-05-28 14:53:38 -07:00
Nathan Sobo
0e31557abf
Only measure character widths when editor is visible
2014-05-23 15:59:44 -06:00
Nathan Sobo
5b149bd41a
Merge pull request #2370 from atom/ns-react-fix-scroll-corruption
...
Prevent React editor's scroll view from being auto-scrolled by Chromium
2014-05-23 12:54:15 -06:00
Corey Johnson
3784b77b95
Merge remote-tracking branch 'origin/master' into cj-paragraph-test
2014-05-23 09:23:30 -07:00
karlin
64470a3c7d
add moveToBeginningOf{Next,Previous}Paragraph for cursor and wrappers for editor
2014-05-23 00:51:01 -04:00
Nathan Sobo
446a48ca00
Position hidden input at 0,0 unless cursor is focused
...
The editor's scroll view is getting autoscrolled when the editor is
focused, so we won't position the hidden input until after the editor
is focused, and will always return it to 0,0 when the editor is blurred.
2014-05-22 20:13:50 -06:00
Nathan Sobo
875cfefd36
Merge branch 'master' into ns-ks-react-dont-measure-when-hidden
...
Conflicts:
spec/editor-component-spec.coffee
src/editor-component.coffee
src/editor-scroll-view-component.coffee
src/lines-component.coffee
2014-05-22 10:48:21 -06:00
Kevin Sawicki & Nathan Sobo
481935c880
Add specs for updating lineHeightInPixels when changing font size/family
2014-05-22 10:17:22 -06:00
Kevin Sawicki & Nathan Sobo
8ffcdad89a
Re-measure the line height in pixels when the CSS line-height changes
2014-05-22 10:17:21 -06:00
Kevin Sawicki & Nathan Sobo
9e3ce09658
Rename lineHeight to lineHeightInPixels to distinguish from CSS value
...
CSS has a line-height property with values like '1.3', but we also have
a measured pixel value for line height. It's important to keep these
separate conceptually.
2014-05-22 10:17:12 -06:00
Kevin Sawicki & Nathan Sobo
45eeee9aea
Ensure .lines div is always at least the height of the scroll view
...
This ensures that the wrap guide extends the entire height of the
editor.
2014-05-21 19:07:03 -06:00
Kevin Sawicki & Nathan Sobo
ee9d4ab70e
Don't measure lineHeight/defaultCharWidth when editor is hidden
2014-05-21 17:15:47 -06:00
Kevin Sawicki
c700ca0430
Remove unused sync option
2014-05-21 08:55:40 -07:00
Nathan Sobo
9278920093
Merge branch 'master' into cj-add-invisibles-to-react-editor
...
Conflicts:
src/editor-component.coffee
2014-05-20 17:03:14 -06:00
Nathan Sobo
48b33ed07d
💄
2014-05-20 15:17:19 -06:00
probablycorey
a722d1aa36
Make editor component spec pass
2014-05-20 14:07:36 -07:00
probablycorey
25e3ae0325
Re-render the lines when the showInvisible config option is triggered
2014-05-20 13:58:22 -07:00
Nathan Sobo
2ae7cba452
Don't blink cursors with CSS animation
...
It seems to create intermittent lags when moving the cursor and typing.
2014-05-20 14:04:59 -06:00
Nathan Sobo
fa3ebc8c0f
Fix interval cancellation in specs
2014-05-20 14:03:44 -06:00
probablycorey
ff36781c98
Add failing spec for toggling showInvisibles config option
2014-05-20 12:34:43 -07:00
probablycorey
f962888b35
Remove unnecessary spec
2014-05-20 11:49:40 -07:00
probablycorey
6880368a79
Add soft wrap support to invisibles
2014-05-20 11:49:31 -07:00
probablycorey
c999a6e0e4
Show carriage return invisibles
2014-05-20 10:38:01 -07:00
probablycorey
2bbf5c7800
Remove unnecessary spec
2014-05-20 10:37:24 -07:00
probablycorey
273203e4c9
Fix typo
2014-05-20 10:37:02 -07:00
Nathan Sobo
84e76556da
Try to fix flaky spec
2014-05-20 11:11:35 -06:00
probablycorey
9b5593d020
Put EOL invisibles into their own scope
2014-05-19 17:27:59 -07:00
probablycorey
8b4cff474f
Spec 💄
2014-05-19 17:10:04 -07:00
probablycorey
73ce81d597
Pass invisibles down to lines component
2014-05-19 16:56:53 -07:00
probablycorey
cbe07b49aa
Add basic invisible specs
2014-05-19 16:20:51 -07:00
Nathan Sobo
d2bc7ab192
Merge pull request #2258 from atom/ns-react-scroll-perf
...
Improve scroll performance of the React editor
2014-05-19 14:42:18 -06:00
Nathan Sobo
bfc382c398
Add specs for line/line-number preservation
2014-05-19 14:33:17 -06:00
Kevin Sawicki
314833bbac
Add missing parens on indent guide check
...
Previously the indent guide was always showing on the whitespace only lines
Closes #2274
2014-05-19 08:52:06 -07:00
Corey Johnson
9ca506de4b
Merge pull request #2173 from Locke23rus/issue-1791
...
💄 Deprecate backspaceToBeginningOf{Word,Line}
2014-05-16 15:13:44 -07:00
Nathan Sobo
c058483422
Update the gutter width when the number of digits changes
2014-05-16 15:56:18 -06:00
Nathan Sobo
9b7547cbe0
Get indent guide specs passing again
2014-05-16 15:31:16 -06:00
Nathan Sobo
e74dfe3438
Fix gutter specs and update lines when digit counts change
2014-05-16 15:31:16 -06:00
Nathan Sobo
b000e8e4a2
Get selection specs passing again
2014-05-16 15:31:16 -06:00
Nathan Sobo
64c82f1c87
Update cursor positioning text for simplified token markup
2014-05-16 15:31:15 -06:00
Nathan Sobo
0ad2730353
Update specs for new line node rendering approach
...
Lines are no longer translated on the GPU, and they aren't inserted into
the DOM in an order that reflects their order in the buffer.
2014-05-16 15:31:15 -06:00
Nathan Sobo
070d239f41
Blink cursors with a CSS animation
...
Now that they're on their own layer, I don't think it affects the
repaint timing when typing on lines (if it ever did).
2014-05-16 15:31:13 -06:00