Commit Graph

68 Commits

Author SHA1 Message Date
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
Nathan Sobo
d53d01d95b Replace atom.syntax with atom.grammars 2014-11-20 11:42:49 -07:00
Kevin Sawicki
6d0be70dbc Spy on ipc.send and make it synchronous 2014-11-19 11:32:20 -08:00
Kevin Sawicki
958b19bd83 Cover empty clipboard case 2014-11-17 09:08:29 -08:00
Kevin Sawicki
12ff54c0bd Add spec for middle mouse paste 2014-11-17 08:54:37 -08:00
Ben Ogle
e596bf6ef9 Merge pull request #4144 from atom/bo-overlay-decoration
Overlay decorations
2014-11-12 15:02:40 -08:00
Ben Ogle
2e7e90a8aa Update spec names 2014-11-12 14:43:26 -08:00
Ben Ogle
eae80ca46d Add a check for negative bounds when translating the overlay 2014-11-12 11:50:22 -08:00
Ben Ogle
9acea88101 Change verbiage in spec names 2014-11-11 15:52:44 -08:00
Ben Ogle
b29c0ca2f7 nof 2014-11-11 15:52:21 -08:00
Ben Ogle
a4a3577163 💄 2014-11-11 15:50:34 -08:00
Ben Ogle
9dfaa8a4e5 Add bounds checking for overlay decorations 2014-11-11 15:46:27 -08:00
Ben Ogle
661b09ab1c Don’t need this 2014-11-11 15:45:57 -08:00
Ben Ogle
9399e00033 Properly display when a marker is reversed 2014-11-11 13:32:13 -08:00
Ben Ogle
307108ec6c Specs for positioning the overlay decorations 2014-11-11 13:08:05 -08:00
Ben Ogle
0bb173b646 Add spec for creation and removal of overlay 2014-11-11 11:25:36 -08:00
Nathan Sobo
2de8046f99 Add deprecatedRegionClass option to highlight decorations
This adds a class to each of the contained regions so we can make
existing bundled packages backward-compatible with themes.

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2014-11-11 12:11:26 -07:00
Max Brunsfeld
d97c81bf6a Make undo grouping interval configurable 2014-11-06 09:25:10 -08:00
Max Brunsfeld
d85c07e7e2 Don't wrap undo/redo calls in transactions 2014-11-05 16:59:06 -08:00
Max Brunsfeld
5437236304 Use undo grouping in editor command listeners 2014-11-05 15:58:13 -08:00