Max Brunsfeld
a73de8c0b5
Avoid spurious updates in autoDecreaseIndentForBufferRow
2017-09-23 00:22:11 -07:00
Max Brunsfeld
9abcad11e4
Add shim for TextEditor.languageMode, will deprecate later
2017-09-22 21:06:15 -07:00
Max Brunsfeld
e14aa842ff
Move auto-indent code to TokenizedBuffer, 🔥 LanguageMode
2017-09-22 16:44:21 -07:00
Max Brunsfeld
0884546d3c
Move everything but auto-indent out of LanguageMode
2017-09-22 14:33:02 -07:00
Max Brunsfeld
6c1356cae3
Move folding logic from LanguageMode to TokenizedBuffer
...
* Restate the folding logic to not *use* the TextEditor, but instead to
*return* ranges which can be folded by the editor.
* Convert the LanguageMode spec to JS
2017-09-22 12:04:51 -07:00
Ash Wilson
0782f0f4d0
"Retire" buffer IDs when the buffer can't be deserialized
2017-09-20 10:51:30 -04:00
Ian Olsen
7f7bdbf103
Merge pull request #14495 from warrenpnz/maxScreenLineLength
...
Enable MAX_SCREEN_LINE_LENGTH to now be set via a config option
2017-09-12 11:32:41 -07:00
wpowell-oss
0b55d4e144
maxScreenLineLength rebased to github
2017-09-12 14:38:29 +12:00
t9md
e9cf616844
FIX "softWrapped" appear twice in field extraction
2017-09-12 11:26:51 +09:00
Josh Soref
ef946374b4
spelling: multiple
2017-09-10 15:46:40 +00:00
Josh Soref
ad003695b5
spelling: intersecting
2017-09-10 15:46:39 +00:00
Antonio Scandurra
9bf47f31cb
Fix rendering of block decorations for invalid markers
...
Previously, when a marker became invalid we would delete the
corresponding block decoration from the DOM, without however removing it
from the `lineTopIndex`. Also, we had a similar issue when decorating a
marker that was already invalid: we would account for it in the index
without adding it to the DOM.
This commit addresses the above problems by ensuring that block
decorations are never added for invalid markers. At the same time, the
editor component will still keep track of changes on the marker that was
decorated, so that it can detect when its validity changes and render it
appropriately.
2017-08-30 14:25:20 +02:00
Antonio Scandurra
e980598aba
Honor editor's scrollSensitivity parameter
2017-08-15 12:22:59 +02:00
Nathan Sobo
7f8f184e96
Shim rowsPerPage property on Editor instances
...
Several packages were relying on a raw property rather than the getter
method. This isn't really supported, but may as well keep them working.
2017-08-10 12:55:41 -06:00
Wliu
372cef218c
📝
...
[ci skip]
2017-07-19 21:06:49 -04:00
Matthew Dapena-Tretter
863faffd23
Only expect a single 'did-destroy' event
...
These events will only be fired a single time at most, so we should clean up the listeners after that.
This should help minimize accidental memory leaks.
2017-06-27 16:20:33 -07:00
Nathan Sobo
147e9dff42
Document text decorations
2017-06-15 22:15:31 +02:00
Max Brunsfeld
3b56ef8cbf
Merge remote-tracking branch 'origin/master' into mb-use-native-text-buffer
2017-06-06 17:12:34 -07:00
Jason Rudolph
268f94b89d
Merge pull request #14695 from atom/jr-editors-live-in-workspace-center
...
Provide API for observing the active text editor
2017-06-06 10:09:52 -04:00
Max Brunsfeld
a7736b81e3
Remove code for preserving cursor position on buffer reload
...
Updating the markers correctly is handled by TextBuffer. This
was actually breaking it.
2017-06-02 09:58:57 -07:00
Max Brunsfeld
12d0de0e03
Merge branch 'master' into mb-use-native-text-buffer
2017-06-01 11:09:09 -07:00
Antonio Scandurra
6d1f8ea88c
Render line number gutter without numbers when showLineNumbers is false
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2017-06-01 16:29:04 +02:00
Jason Rudolph
61a52d49aa
Allow text editors in the workspace center, but not in docks
2017-05-31 14:06:46 -04:00
Max Brunsfeld
6c0b70f5f3
Start work on integrating new native TextBuffer version
2017-05-19 11:33:49 -07:00
Antonio Scandurra
d44876f3bc
Merge branch 'master' into tj-upgrade-electron
2017-05-16 14:39:47 +02:00
Lee Dohm
1559c8a047
Merge pull request #12946 from jamsinclair/11848-fix-moving-line-without-line-ending
...
Fixes #11848 Moving line up without line ending
2017-05-13 15:00:46 -07:00
Antonio Scandurra
8ff5d81384
Prevent unnecessary clipping of buffer range in isFoldedAtBufferRow
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2017-05-11 20:12:10 +02:00
Antonio Scandurra
2f2f481fb5
Don't clip screen range when autoscrolling from Cursor
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2017-05-11 19:25:14 +02:00
Antonio Scandurra
c59e972f42
Use buffer coordinates in isFoldedAtCursorRow
...
This avoid an extra screen-to-buffer coordinate translation.
Signed-off-by: Nathan Sobo <nathan@github.com >
2017-05-11 19:18:40 +02:00
Antonio Scandurra
f3a96c968d
Change editor.bufferRowsForScreenRows to include the supplied endScreenRow
2017-05-11 11:00:51 +02:00
Antonio Scandurra
955cf98feb
Use bufferRowsForScreenRows to compute line numbers
2017-05-10 13:45:19 +02:00
Antonio Scandurra
ca3395b1b2
Null out component when editor is destroyed to minimize leaks
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2017-05-09 18:24:24 +02:00
Antonio Scandurra
a7f658a40f
Move cursors within a transaction to batch marker layer update events
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2017-05-05 19:55:18 +02:00
Nathan Sobo
edf1b7fb74
Remove dead code
2017-05-05 11:30:14 -06:00
Antonio Scandurra
15f25a745a
Update width of content when approximate longest screen row changes
2017-05-05 11:29:57 -06:00
Antonio Scandurra
c541d3941c
Fix remaining test failures in core
2017-05-05 09:30:08 +02:00
Antonio Scandurra
001fef4a05
Don't activate scrollPastEnd for autoHeight editors
2017-05-05 09:30:08 +02:00
Antonio Scandurra
ccc35b5141
Make first-mate scope ids always larger than built-in ones
2017-05-05 09:29:30 +02:00
Antonio Scandurra
f17baf4790
Use scope ids instead of tags
2017-05-05 09:29:30 +02:00
Antonio Scandurra
59ae239a8c
Provide an editorElement shim on TextEditor
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2017-05-05 09:29:30 +02:00
Antonio Scandurra
6a083e14a2
Schedule component updates directly from the model
...
The only event-based APIs we kept are for listening to changes in block
decoration markers.
2017-05-05 09:29:29 +02:00
Nathan Sobo
3d6921cca3
Add cursor decorations
...
These decorations allow the class and style of a cursor associated with
any marker to be customized.
/cc @t9md
2017-05-05 09:29:29 +02:00
Nathan Sobo
f2070ef880
Restore editor scroll position across reloads
...
This commit introduces the concept of a scrollTopRow and
scrollLeftColumn which is used to query and update the logical scroll
position.
2017-05-05 09:29:29 +02:00
Antonio Scandurra
f9cb1f87a7
Implement TextEditor.prototype.getRowsPerPage
2017-05-05 09:29:29 +02:00
Nathan Sobo
eb7cdf2a34
Delegate get/setFirstVisibleScreenColumn from the model to the component
2017-05-05 09:29:29 +02:00
Nathan Sobo
4f52637518
Delegate setFirstVisibleScreenRow from the model to the component
2017-05-05 09:29:29 +02:00
Nathan Sobo
493b735740
Delegate getFirst/LastVisibleScreenRow from model to component
2017-05-05 09:29:29 +02:00
Nathan Sobo
69a29b2c58
Delegate (get|set)(Height|Width) to element
...
Rather than storing these values on the editor model.
2017-05-05 09:29:29 +02:00
Antonio Scandurra
f7c55b9473
Honor the updateSynchronously parameter
2017-05-05 09:29:29 +02:00
Nathan Sobo
c8f2fbb657
Get TextEditorElement tests passing
2017-05-05 09:29:29 +02:00