wpowell-oss
0b55d4e144
maxScreenLineLength rebased to github
2017-09-12 14:38:29 +12: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
Nathan Sobo
95c8950004
Re-measure and update rendered content when editor styles change
2017-05-05 09:29:28 +02:00
Nathan Sobo
8aae3ab1ae
Hide cursors with non-empty selection if showCursorsOnSelection is false
...
Also, remove some barely used public APIs around cursor visibility that
don't make much sense and are not ideal for performance. We don't want
to subscribe to the visibility of each cursor.
2017-05-05 09:29:28 +02:00
Nathan Sobo
4e834da3e3
WIP: Render gutters before initial measurement
...
The shouldUpdate method is just returning true for now. We probably need
to find a new approach to representing line number decorations that's
easier to diff, perhaps a sparse array?
2017-05-05 09:29:28 +02:00
Nathan Sobo
1b1cffb32d
⬆️ etch to allow arbitrary objects as keys
2017-05-05 09:29:28 +02:00
Nathan Sobo
d8b22fb3bd
Associate gutters with their elements and support showing/hiding gutters
2017-05-05 09:29:28 +02:00
Nathan Sobo
4707803416
Use the atom.views scheduler in TextEditorComponent
...
This ensures smooth scheduling interactions with autocomplete-plus
overlays so they measure their dimensions at the right time.
2017-05-05 09:29:28 +02:00
Nathan Sobo
1676617218
Add static TextEditor.viewForOverlayItem method to avoid using global
2017-05-05 09:29:28 +02:00
Nathan Sobo
2075f06404
WIP: Introduce dummy scrollbars
...
Still need tests on all of this
2017-05-05 09:29:28 +02:00