Antonio Scandurra
efefc0dc66
DisplayBuffer#getEditorWidthInChars must always be >= 0
2015-02-27 00:55:03 +01:00
Nathan Sobo
c9ce9f41c2
Merge pull request #5567 from as-cii/indent-soft-wrap
...
Indent soft wrap
2015-02-25 19:06:35 -07:00
Nathan Sobo
5fdb3cde08
Fix ::longestScreenRow update for changes directly above longest line
...
Fixes #5716
2015-02-24 11:36:01 -07:00
Antonio Scandurra
0258531a3c
Use softWrapIndentation name consistently
2015-02-20 10:28:27 +01:00
Antonio Scandurra
ab5c79d009
Revert softWrapAtNewline attempt
...
...now we use `skipSoftWrapIndentation: true` when moving up and down.
2015-02-20 10:02:34 +01:00
Antonio Scandurra
ed77358515
Show guide on soft wrapped lines with indentation
...
* Rename phantomToken to softWrapIndent and use it consistently
* Build multiple softWrapIndent tokens in order to show guides
* Memoize softWrapIndentTokens and softWrapIndentDelta
2015-02-20 09:29:37 +01:00
Antonio Scandurra
59cc10a1ee
Bring in @nathansobo PR changes
...
...as they were needed to pass specs
2015-02-19 21:09:06 +01:00
Antonio Scandurra
79c16a0d00
Use softWrapAtNewLines in moveDown and moveUp
...
/cc: @nathansobo
2015-02-19 20:01:37 +01:00
Antonio Scandurra
67ef17e0c8
💚 Fix soft wrapping scroll spec
2015-02-19 16:23:59 +01:00
Antonio Scandurra
85e202ee0a
Get rid of wrapAtPhantomTokens
2015-02-19 16:23:51 +01:00
Antonio Scandurra
8184ad9a77
✅ Ensure phantom tabs are correctly tokenized
2015-02-18 21:31:00 +01:00
Antonio Scandurra
bef1e862cc
✅ Fix failing specs (and add new ones)
...
When fixing failing specs, I adapted existing expectations to match the "soft
wrap indenting" behaviour: this means that there's no need to write a new spec
for it.
2015-02-18 21:20:04 +01:00
Nathan Sobo
8c574bfd30
Rename 'gutter' decorations to 'line-number' decorations
2015-01-14 19:49:46 -07:00
Max Brunsfeld
0d5a707ffb
Fix folding with splits
...
Fixes #4099
Signed-off-by: Nathan Sobo <nathan@github.com >
2015-01-14 09:43:20 -08:00
Nathan Sobo
7422f4378e
Add property filters to TextEditor::getDecorations methods
...
This makes it much easier to write tests that inspect the state of
decorations.
2014-12-10 19:11:50 -07:00
Nathan Sobo
4d796f614c
Update Tokenized/DisplayBuffer prior to TextBuffer::onDidChange handlers
...
Fixes #3789
2014-10-27 13:56:23 -06:00
Lee Dohm
00baedbdf9
Add specs for editor.scrollPastEnd behavior
2014-09-25 23:05:47 -07:00
Ben Ogle
9af2325f17
Rename DisplayBufferMarker -> Marker
...
Gnar!! 😎
2014-09-18 13:53:12 -07:00
Ben Ogle
cef8b95ef3
Deprecate s|getAttributes for s|getProperties
2014-09-18 13:53:12 -07:00
Ben Ogle
e6dbea09fe
Add onDidCreateMarker and onDidUpdateMarkers
2014-09-05 17:26:14 -07:00
Ben Ogle
7ae25d34e7
Decoration Params -> Properties
2014-09-05 16:20:42 -07:00
Ben Ogle
e6e6028683
Deprecate decoration events
2014-09-05 15:14:27 -07:00
Ben Ogle
6e8a626de2
Add ::onDidChangeSoftWrapped to DisplayBuffer and Editor
2014-09-05 13:41:46 -07:00
Ben Ogle
21e4d8a064
Add DisplayBuffer::onDidChange
2014-09-05 13:30:59 -07:00
Ben Ogle
9435f852dd
Use new decoration updated event method
2014-09-05 12:25:14 -07:00
Nathan Sobo
6bd8702421
Deprecate DisplayBufferMarker::on
2014-09-05 11:39:34 -07:00
Nathan Sobo
1131b33a83
Add DisplayBufferMarker::onDidChange and ::onDidDestroy
2014-09-05 11:39:33 -07:00
Nathan Sobo
965afc2c37
Rename softWrap to softWrapped
...
Our new pattern for booleans is to have ::set and ::is, and that means
the property name needs to be in passive voice for ::is to make sense.
This is in preparation for adding a new change observation method.
* ::setSoftWrapped
* ::isSoftWrapped
* ::toggleSoftWrapped
2014-09-05 11:39:33 -07:00
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