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
10458a5b45
Always autoscroll when the range of the last selection changes
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2015-03-26 15:30:53 -06:00
Max Brunsfeld
2f5d975338
Remove autoscroll-related legacy editor view support
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2015-03-26 11:12:37 -07:00
Kevin Sawicki
576e00fb93
Keep returning array from TextEditor::mutateSelectedText
2015-03-19 11:57:16 -07:00
Kevin Sawicki
d9a5aff919
Add explicit return after for loop
2015-03-19 11:48:40 -07:00
Kevin Sawicki
792a124668
Add onDidChangeIcon event subscription
2015-03-16 16:44:53 -07:00
Kevin Sawicki
55a7ef352d
Deprecate all TextEditor::on calls
2015-03-16 16:44:52 -07:00
Nathan Sobo
010154f802
Merge pull request #5959 from atom/as-fix-select-above-below
...
Use screen ranges to select above and below
2015-03-16 11:26:54 -06:00
Antonio Scandurra
f4b791d33b
Use screenPosition to select above and below
2015-03-13 10:57:45 +01:00
Antonio Scandurra
73ee326bb3
📝 Document destroyFoldsContainingBufferRange
...
...and correct docs for `destroyFoldsIntersectingBufferRange`.
2015-03-11 16:17:40 +01:00
Antonio Scandurra
2b98192276
Destroy only containing folds on selection
2015-03-11 16:16:45 +01:00
Antonio Scandurra
2aa3e5fd8c
🐎 Speed up destroyFoldsIntersectingBufferRange
2015-03-05 09:01:28 +01:00
Antonio Scandurra
af65849880
Move batching management down into presentation layer
2015-02-27 12:17:34 +01:00
Antonio Scandurra
c638c23e3f
🐎 One mergeIntersectingSelections per text mutation
...
* Return fn value from `mergeIntersectingSelections` if supplied
2015-02-26 18:27:08 +01:00
Antonio Scandurra
c8fb791343
Merge branch 'master' into batch-updates
2015-02-26 11:27:08 +01:00
Antonio Scandurra
50f2aded3a
Better batching
2015-02-26 11:26:48 +01:00
Antonio Scandurra
0ce3c49688
Batch returns the function value
...
* Emit only one event for nested batches
2015-02-26 10:50:43 +01:00
Antonio Scandurra
fdcbb9c8ff
Don't change mergeIntersectingSelections behavior for now
2015-02-25 18:44:43 +01:00
Antonio Scandurra
cbfbf84990
🐎 Introduce batching, and update UI accordingly
2015-02-25 17:40:39 +01:00
Antonio Scandurra
ce8a5a210c
Detect batch cursor move
2015-02-25 17:06:35 +01:00
Antonio Scandurra
b2bed7cea8
Detect batch selections
2015-02-25 17:06:34 +01:00
Antonio Scandurra
4555c77e5a
Use hashes instead, and avoid sorting 👊
2015-02-25 11:20:15 +01:00
Antonio Scandurra
6670cc8aa0
🐎 Speed up mergeCursors
2015-02-25 10:42:39 +01:00
Max Brunsfeld
33af0f028b
🎨 Use prettier emptiness check
2015-02-24 15:31:51 -08:00
Max Brunsfeld
88c2cef91f
Make :checkout-head-revision command work w/ multiple repos
2015-02-24 15:30:04 -08:00
Antonio Scandurra
7fe3135526
🎨 Give code a better structure
2015-02-22 15:04:37 +01:00
Antonio Scandurra
37b4183542
🐎 Improve mergeIntersectingSelections performance
...
Order selections first and intersect only with the last one.
This brings the cost of mergeIntersectingSelections down to O(n log n).
2015-02-22 14:04:03 +01:00
Nathan Sobo
62c8244bf2
Merge branch 'master' into ns-editor-presenters
2015-02-09 13:37:27 -07:00
Nathan Sobo
c8c13b8b40
Use cached .foldable values on TokenizedBuffer instead of recomputing
2015-02-06 18:54:34 -07:00
Kevin Sawicki
83c8d904cf
🎨 Add space before arrow
2015-02-04 17:44:33 -08:00
Kevin Sawicki
fd1d872840
Prompt split editors to save on close
...
Previously an editor that was split into multiple panes would not
prompt to save correctly when the window was unloading.
This adds a new `windowCloseRequested` option passed through from the
beforeunload handler to the editor so that it can specially handle this
case.
Closes #5257
2015-02-04 17:14:46 -08:00
Nathan Sobo
20838accc1
Key line numbers by buffer row and soft-wrap count
...
…instead of an array. This will make things simpler to diff in the
view.
2015-02-03 15:05:24 -07:00
Nathan Sobo
5d2efc0469
Deprecate TextEditor::getGutterDecorations
...
Forgot to rename it when we renamed decorations of type ‘gutter’ to
‘line-number’. It’s not used in core or any packages at the time of
this commit.
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2015-02-03 15:05:22 -07:00
Nathan Sobo
115d764725
Handle scoped character widths in TextEditorPresenter
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2015-02-03 15:05:14 -07:00
Kevin Sawicki
1fc597ca22
🎨
2015-01-21 11:23:28 -08:00
Kevin Sawicki
c378ef0649
Merge pull request #5044 from russlescai/rl-scoped-file-encoding
...
Allow scoped default File Encoding
2015-01-21 11:22:17 -08:00
Nathan Sobo
c69f4baa04
Merge pull request #5068 from atom/ns-line-number-decorations
...
Rename 'gutter' decorations to 'line-number'
2015-01-14 20:04:02 -07:00
Nathan Sobo
5a4cf01083
Move getFirst/LastVisibleScreenRow to the view
2015-01-14 20:02:49 -07:00
Nathan Sobo
542ed631e8
Emit deprecation warnings for decorations of type ‘gutter’
2015-01-14 19:49:46 -07:00
Nathan Sobo
8c574bfd30
Rename 'gutter' decorations to 'line-number' decorations
2015-01-14 19:49:46 -07:00
Russell Lescai
c538857cfa
Removed unnecessary braces.
2015-01-15 08:57:25 +10:30
Russell Lescai
3d1baaf3f3
Added spec. Changed argument order for config get/set.
2015-01-14 13:46:21 +10:30
Russell Lescai
b819f681aa
Moved setEncoding to TextEditor constructor.
2015-01-14 13:05:20 +10:30
Tony Han
4ebf748fd7
📝 fix ::observeCursors doc
...
Change selection -> cursor
2015-01-14 01:53:25 +08:00
Nathan Sobo
7f8ab72f53
Capitalize initialisms
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2015-01-12 22:00:24 -08:00
Nathan Sobo
43f57347d7
Add ‘gutter-hidden’ attribute to TextEditorElement
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2015-01-12 16:21:31 -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
Lee Dohm
ef97197681
Use list.map instead of _.map list
2015-01-09 16:42:16 -08:00