Nathan Sobo
ae4f7f6170
Explicitly autoscroll when needed
...
Rather than when the selection’s marker changes. This is simpler than
suppressing autoscroll via state when we don’t want it. It also captures
the intent to autoscroll when attempting to move the cursor at the
beginning or end of the document.
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2015-03-26 16:48:24 -06:00
Nathan Sobo
99c437ccec
Allow autoscroll override option in cursor/selection methods
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2015-03-26 16:48:21 -06:00
Nathan Sobo
2bfd30c832
Revert "Revert "Don't soft-wrap on indentation""
2015-03-19 14:37:39 -06:00
Nathan Sobo
6345799cf3
Revert "Don't soft-wrap on indentation"
2015-03-19 12:47:58 -06:00
Antonio Scandurra
61cc9b97ea
💚 Fix failing spec
2015-03-19 11:45:54 +01:00
Antonio Scandurra
8c297ba1fc
✅ Verify corrupted state graceful handling
2015-03-09 13:43:33 +01:00
Ivan Zuzak
03a064b6e9
Add specs for mouse interactions on gutter with soft wrap
2015-03-03 13:59:46 +01:00
Ivan Zuzak
574158dc6d
Add test for foldable icons on soft wrapped lines
2015-02-27 15:30:24 +01:00
Nathan Sobo
6a9abd1f66
🐎 Don’t blink cursors when editor isn’t focused
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2015-02-26 15:23:11 -07:00
Nathan Sobo
986e8bf85f
Allow multiple space-delimited classes for highlight decorations
...
Fixes #5747
2015-02-25 14:35:32 -07:00
Nathan Sobo
32d393d26f
Pause polling when updates are requested, but don’t start polling over
...
The blinking cursor was ensuring that we never polled in certain cases.
We need to allow the interval to continue polling at a normal pace, but
just avoid doing any work that could delay the next animation frame.
2015-02-20 09:51:11 -07:00
Nathan Sobo
1d84d74e50
Centralize text editor DOM interaction through atom.views
...
This ensures that DOM writing, reading, and polling properly interleaves
with DOM interactions from other text editors and any other code that
coordinates via atom.views. Not sure about the location of it though.
2015-02-19 17:14:58 -07:00
Nathan Sobo
7033b27207
Make EditorComponent a plain JS object rather than a React component
2015-02-19 17:14:57 -07:00
Nathan Sobo
2fba4979f9
Use presenter to determine gutter visibility
2015-02-19 17:14:56 -07:00
Nathan Sobo
bf29a020e1
Use presenter for focused state in EditorComponent
2015-02-19 17:14:55 -07:00
Nathan Sobo
52a9a76b2a
Use presenter state in InputComponent
2015-02-19 17:14:54 -07:00
Nathan Sobo
168df987d7
Make GutterComponent a plain JS object instead of a React component
2015-02-19 17:14:53 -07:00
Nathan Sobo
c06e100fae
Make LinesComponent a normal object instead of a React component
...
Also, remove ability to disable hardware acceleration since there’s
no longer a need for it and it complicated this conversion.
2015-02-19 17:14:53 -07:00
Nathan Sobo
883af7a83e
Update cursor nodes manually
2015-02-19 17:14:52 -07:00
Nathan Sobo
205d1df7b4
Precompute ::startRow and ::endRow in presenter
2015-02-12 11:34:45 -07:00
Nathan Sobo
ba6d11e24e
Merge branch 'master' into ns-editor-presenters
2015-02-04 07:57:04 -07:00
Nathan Sobo
973d7ebf13
Add spec coverage for indent guides + invisibles on blank lines
2015-02-03 21:26:01 -07:00
Nathan Sobo
78b8039384
Don’t require sync update before measuring when autoHeight changes
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2015-02-03 15:05:45 -07:00
Nathan Sobo
edd595a72f
Access mouseWheelScreenRow property instead of calling removed method
2015-02-03 15:05:43 -07:00
Nathan Sobo
510520d2c7
🎨 rename ::getStart/EndRow to ::computeStart/EndRow
2015-02-03 15:05:32 -07:00
Nathan Sobo
efdba9fc24
Use presenter state for scrollbars and scrollbar corner
2015-02-03 15:05:31 -07:00
Nathan Sobo
9de8ab949f
Drop TextEditorComponent::getRenderedRowRange
2015-02-03 15:05:30 -07:00
Nathan Sobo
6108c04f40
Add spec coverage for deprecated ‘cursor:moved’ event
...
So we don’t accidentally drop it during this transition
2015-02-03 15:05:30 -07:00
Nathan Sobo
76241fb779
Handle line and line number preservation in presenter
...
The target of mousewheel events needs to be preserved when scrolling.
It used to be dealt with in the view, but now we can do it in the
presenter for a simpler view implementation.
2015-02-03 15:05:29 -07:00
Nathan Sobo
49bf3bb14e
Use presenter to render flashes
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2015-02-03 15:05:22 -07:00
Nathan Sobo
8ebd057b0c
Use presenter to render highlights
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2015-02-03 15:05:22 -07:00
Nathan Sobo
3b93f3d71b
Blink cursors based on presenter state
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2015-02-03 15:05:21 -07:00
Nathan Sobo
32a1854b7c
Use TextEditorPresenter::state.content.indentGuidesVisible
2015-02-03 15:05:16 -07:00
Nathan Sobo
a3fb8b3aaa
Disable spec until presenter approach stabilizes
2015-02-03 15:05:14 -07:00
Nathan Sobo
8c574bfd30
Rename 'gutter' decorations to 'line-number' decorations
2015-01-14 19:49:46 -07:00
Nathan Sobo
002918049d
🐎 Cache gutterVisible state in React component
...
This avoids a config read on every render.
2015-01-12 16:21:31 -07:00
Nathan Sobo
f00b0b7f7a
Add TextEditor::set/isGutterVisible
...
Controls gutter visibility on individual editors.
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2015-01-12 16:21:31 -07:00
Nathan Sobo
7f9d06f55b
Move TextEditor::pixelPositionForScreen/BufferPosition to view layer
...
It doesn’t make sense to talk about pixels at the model layer long-term,
even though we currently store view dimension information in the model
so we don’t have to read from the DOM for optimization purposes. This
information is only available if the view is attached, however, making
these methods a liability on the model layer.
2015-01-09 08:22:45 -08:00
Max Brunsfeld
32275b27a3
Always spy on _.now
2014-12-30 00:04:17 -08:00
Max Brunsfeld
a1b4820c04
Revert "Revert "Merge pull request #4631 ""
...
This reverts commit dc2a453986 .
Conflicts:
spec/config-spec.coffee
src/config.coffee
2014-12-23 09:26:40 -08:00
Kevin Sawicki
f5ae96820a
Update spec for new middle mouse paste behavior
2014-12-18 11:04:52 -08:00
Max Brunsfeld
dc2a453986
Revert "Merge pull request #4631 from atom/mb-new-config-api"
...
This reverts commit 5147fb6a8b , reversing
changes made to 9bbbb58084 .
2014-12-16 15:27:39 -08:00
Max Brunsfeld
5147fb6a8b
Merge pull request #4631 from atom/mb-new-config-api
...
New config API
2014-12-16 15:22:15 -08:00
Ben Ogle
09a0773043
Handle editor destruction when dragging.
...
Closes #4622
2014-12-16 14:52:07 -08:00
Nathan Sobo
c489a4662b
Make scopeSelector a trailing option to Config::set
2014-12-16 14:00:56 -08:00
Nathan Sobo
b386b00bc0
Wait for next animation frame before measuring when stylesheets change
...
Fixes #4479
2014-12-09 14:56:33 -07:00
Nathan Sobo
de619a731b
Merge pull request #4315 from atom/remove-deprecations
...
Remove deprecations from core
2014-11-27 12:16:35 -07:00
Nathan Sobo
b341749d54
Add TextEditorElement::setUpdatedSynchronously
...
To allow testing of async editor rendering in packages. This is helpful
for overlay decorations which behave differently when rendering is
async.
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2014-11-26 18:13:12 -07:00
Ben Ogle
aefc647155
Use normalizeLineEndings: false hash
2014-11-26 14:55:39 -08:00
Nathan Sobo
1e50985ec7
Add ‘position’ option to overlay decorations
...
By default overlays are positioned at the head of the given marker.
This option allows them to be positioned at the tail instead by passing
`position: ’tail’` when creating the decoration, which is useful for
autocomplete.
2014-11-26 12:29:52 -07:00