Nathan Sobo
6345799cf3
Revert "Don't soft-wrap on indentation"
2015-03-19 12:47:58 -06:00
Antonio Scandurra
56020b11b0
🐛 Avoid soft-wrapping on indentation
2015-03-19 11:36:55 +01:00
Antonio Scandurra
fbfe19825b
Even more descriptive specs ✨
2015-03-18 18:00:31 +01:00
Antonio Scandurra
8559526215
✅ Write a more comprehensive spec
2015-03-18 17:42:25 +01:00
Antonio Scandurra
7c33b9bf41
🎨 Rename to softWrapHangingIndent
2015-03-18 14:18:27 +01:00
Antonio Scandurra
f0b9bb7ce3
Show indent guides on hanging indentation too
2015-03-18 11:17:34 +01:00
Antonio Scandurra
6ac8af2a6e
✅ Check leading spaces as well
2015-03-17 22:58:14 +01:00
Antonio Scandurra
6d39bd3657
✅ Verify that hanging indentation is tokenized
2015-03-17 22:21:07 +01:00
Antonio Scandurra
3b5a0b292d
📝 Better and consistent naming across specs and docs
2015-03-12 12:32:59 +01:00
Antonio Scandurra
faa2944232
✅ Cover edge case scenario
...
...where buffer rows are less than rows fitting on screen
2015-03-12 10:33:19 +01:00
Antonio Scandurra
912dd732a9
🎨 Uniform new tests structure
2015-03-12 10:17:26 +01:00
Antonio Scandurra
9f1bb82451
Adjust DisplayBuffer#getVisibleRowRange logic
...
This fixes #4596 , where the calculation returned a wrong range.
* 📝 State clearly that we'll return a closed interval in docs
* ✅ Write tests to ensure a correct behavior
2015-03-12 10:08:02 +01:00
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