Ben Ogle
ae49fd50b7
DisplayBuffer::linesForRows -> ::tokenizedLinesForScreenRows
...
Clarity!
2014-09-03 14:42:46 -07:00
Ben Ogle
2b9b4a48ef
tokenizedLineForRow -> tokenizedLineForScreenRow
2014-09-03 14:42:45 -07:00
Ben Ogle
05bbc480b0
displayBuffer::lineForRow -> tokenizedLineForRow
2014-09-03 14:42:45 -07:00
Ben Ogle
c3c91ae6c3
Only emit the marker-created event when the marker exists
...
This caused problems in the case of find-and-replace:select-all with
multiple editors into the same file.
* a marker is created on the TextBuffer capturing the selection
* DisplayBuffer:create-marker is fired from the first DisplayBuffer.
The marker is turned into a selection which is merged into the current
selection, deleting the marker that was created.
* DisplayBuffer::handleBufferMarkerCreated is called on the second
DisplayBuffer. The marker has been destroyed at this point, so it emits
DisplayBuffer:create-marker with undefined.
* ERROR>
Closes #3364
2014-08-25 11:42:44 -07:00
Ben Ogle
2b957beeda
💄 Fix ugly test
2014-07-08 11:18:47 -07:00
Kevin Sawicki
5d08ecdcb2
Remove logging in specs
2014-07-08 10:57:22 -07:00
Ben Ogle
ce1ebec253
Fix specs
2014-07-07 17:48:24 -07:00
Ben Ogle
d7a3ffa9de
Handle Decoration::update
2014-07-07 15:13:04 -07:00
Ben Ogle
e991b3d10c
Move from addDecoration
-> decorateMarker
2014-07-07 14:43:56 -07:00
Nathan Sobo
673b62f547
Scroll React editor all the way left when soft wrap is enabled
...
Fixes #2842
2014-07-07 12:26:33 -06:00
Ben Ogle
80eb31679f
Add a Decoration object. Rework to use this object
2014-07-03 17:32:37 -07:00
Nathan Sobo
c2b7955ec6
Adjust DisplayBuffer::longestScreenRow when lines are inserted/removed
...
Fixes #2810
The line corresponding to the longest screen row moves when lines are
inserted or removed above it, so we need to adjust it accordingly or we
won't always realize when a change affects the longest line.
2014-07-03 16:15:49 -06:00
Nathan Sobo
a99bde4e2d
Reassign scrollTop if deleting lines decreases the max scrollTop
...
Fixes #2725
2014-07-01 09:01:04 -06:00
Ben Ogle & Nathan Sobo
f739dce210
Only recompute scroll width once for each batch of measured chars
2014-06-25 15:26:13 -07:00
Ben Ogle & Nathan Sobo
77389b0518
Update scrollWidth when the max line length / default char width changes
2014-06-25 15:26:13 -07:00
Ben Ogle
196f64d846
Fix specs
2014-06-25 15:26:13 -07:00
Nathan Sobo
b9a3eca091
Correcly handle folds that end where other folds begin
...
Fixes #2247
2014-06-23 11:29:14 -06:00
Nathan Sobo
17f9cc49f2
Honor the center: true
option in scrollTo* methods
...
Fixes #2648
2014-06-18 21:48:14 -06:00
Nathan Sobo
2fffbba503
Eliminate Decoration class and use plain objects instead
2014-06-17 17:35:56 -06:00
Ben Ogle & Nathan Sobo
120e2a3bdb
Move decoration Editor specs to DisplayBuffer
2014-06-16 15:36:08 -07:00
Ben Ogle & Nathan Sobo
7142022f05
Add intersection support to DisplayBuffer::findMarkers
2014-06-16 15:36:08 -07:00
Ben Ogle & Nathan Sobo
25520a4cad
Add containedInScreenRange to DisplayBuffer::findMarkers
2014-06-16 15:36:08 -07:00
Ben Ogle & Nathan Sobo
56da6399b8
Add startScreenRow and endScreenRow to DisplayBuffer::findMarkers
2014-06-16 15:36:08 -07:00
Kevin Sawicki & Nathan Sobo
9e3ce09658
Rename lineHeight to lineHeightInPixels to distinguish from CSS value
...
CSS has a line-height property with values like '1.3', but we also have
a measured pixel value for line height. It's important to keep these
separate conceptually.
2014-05-22 10:17:12 -06:00
Nathan Sobo
7b4bc16531
Fix specs that broke when accounting for horizontal scrollbar height
2014-05-09 11:33:03 -06:00
Corey Johnson
c03dec2783
Merge remote-tracking branch 'origin/master' into cj-add-deprecation-warning-to-specs
2014-04-23 16:51:14 -07:00
Corey Johnson
c1907054b7
Remove deprecated methods from display buffer spec
2014-04-23 16:24:10 -07:00
Nathan Sobo
f53d489abb
Add DisplayBuffer::scrollToScreen/BufferPosition
...
Also add delegators in Editor and ReactEditorView
2014-04-22 17:10:23 -06:00
Nathan Sobo
4b9871fa13
Enable advanced scroll management only when editor is used by react view
...
This preserves the original behavior of the editor model with respect
to scroll position and autoscroll unless it's being used by the react
component, which flips the ::manageScrollPosition flag to true.
2014-04-22 17:09:41 -06:00
Nathan Sobo
7a4dc0b9a4
Eliminate duplicate key to pass coffeelint
2014-04-22 17:09:40 -06:00
David Graham & Nathan Sobo
d0a917ed14
Prevent scrollLeft/scrollTop from going out of bounds
2014-04-22 17:09:39 -06:00
Nathan Sobo
148a9f0248
Add DisplayBuffer::pixelPositionForScreenPosition
...
This bakes character width tracking into display buffer directly, which
moves us toward a world where all rendering decisions can be made in the
model to strictly control DOM reads.
2014-04-22 17:09:03 -06:00
Corey Johnson
1583271e2f
Use setTextInRange instead of change
2014-04-18 15:50:30 -07:00
Nathan Sobo
70cd6a6bc3
💄 Use CoffeeScript :: notation in specs
...
Going to add another spec on a branch and prefer to stick with our new
convention.
2014-04-02 07:58:48 -06:00
Nathan Sobo
6e9217be5f
Reenable disable display-buffer-marker specs
2014-04-02 07:50:24 -06:00
Nathan Sobo
ce4ce55b29
Make outermostFoldsForBufferRowRange exclusive of end row
2014-03-06 12:52:27 -07:00
Nathan Sobo
d97a0a3324
Add DisplayBuffer::outermostFoldsInBufferRowRange
2014-03-06 12:36:42 -07:00
Nathan Sobo
06bc09951d
Fix position translation bug for wrapped lines with hard tabs
...
Fixes #1681
2014-03-04 17:55:53 -07:00
Nathan Sobo
40a8522460
Merge pull request #1623 from atom/ns-fix-editor-width-related-freezes
...
Fix freezes related to the editor's width in characters being assigned to non-positive integers
2014-02-28 20:38:07 +02:00
Nathan Sobo
4681098e8c
Only allow positive widths in characters to be assigned
...
Fixes #1574
2014-02-28 10:31:02 -08:00
Nathan Sobo
83dc1c76ef
Add a spec that corrupts the row map by partially editing a fold
2014-02-28 10:11:57 -08:00
Nathan Sobo
f17c490768
Make Editor::unfoldBufferRow destroy all folds containing the buffer row
...
Also, remove ::destroyAllFoldsContainingBufferRow as it is now redundant
2014-02-27 16:16:01 -08:00
Kevin Sawicki
189ebc4476
Remove _/fs from modules directly
2014-02-23 17:09:05 -08:00
probablycorey
e01be5d41a
Update display buffer spec
2014-02-10 15:52:33 -08:00
Nathan Sobo
e26d97d5ac
Remove telepath as a core dependency
2014-01-03 17:42:11 -07:00
Ben Ogle
75153388cc
Use tab char
2013-12-16 15:50:26 -08:00
Ben Ogle
77b5fd47ca
Dont re-atomicize atomic tokens.
...
Fixes #1318
2013-12-16 15:34:27 -08:00
Nathan Sobo
1ccc93c50b
Make DisplayBuffer a telepath model subclass
2013-12-07 03:07:15 -08:00
Kevin Sawicki
d0b380e535
Add atom prefix to rootView and project references
2013-11-20 17:23:47 -08:00
Kevin Sawicki
2eeb399cf1
Remove deserializer shims on window
2013-11-20 13:51:12 -08:00