Commit Graph

14197 Commits

Author SHA1 Message Date
Antonio Scandurra
c609f6c967 Destroy DisplayLayer upon DisplayBuffer destruction 2016-03-25 10:53:02 +01:00
Antonio Scandurra
27aad42644 Handle tab length retokenization in DisplayLayer
We still want to keep the tab length in TokenizedBuffer, because we need
it to understand if a certain buffer row is foldable or not (due to the
indent level)
2016-03-25 10:33:12 +01:00
Antonio Scandurra
e6cb5c8e89 🐛 Guard against unexisting screen rows 2016-03-24 15:57:24 +01:00
Antonio Scandurra
a8d6a0036d Don’t unfold buffer rows when editing 2016-03-24 13:40:24 +01:00
Antonio Scandurra
6acbbb3a5c Improve DisplayLayer management 2016-03-23 17:20:08 +01:00
Antonio Scandurra
21831a4e43 🐛 Fix inaccurate logic in moveLineDown
Instead of deleting and then inserting, it’s better to do the opposite
so that we don’t have to translate points at all.
2016-03-23 16:16:51 +01:00
Antonio Scandurra
756db7588b Return an invalidated range only when TokenizedBuffer has one 2016-03-22 14:59:26 +01:00
Antonio Scandurra
9abc547bfb Copy also DisplayLayer 2016-03-22 14:56:22 +01:00
Antonio Scandurra
326f2c6a9e Add TextEditor.prototype.tokensForScreenRow for testing purposes 2016-03-22 14:49:42 +01:00
Antonio Scandurra
b1e07c0cfe Use the new lineText property 2016-03-22 14:36:28 +01:00
Antonio Scandurra
27799d30f6 Use deserialized display layer when possible 2016-03-22 14:27:23 +01:00
Antonio Scandurra
4e23748660 Fix moveLineUp and moveLineDown to work with free-form folds 2016-03-22 14:02:13 +01:00
Antonio Scandurra
227670a407 Merge branch 'master' into ns-use-display-layers 2016-03-22 12:01:07 +01:00
Michelle Tilley
64308bbacb Revert "Revert "Allow pasting white space when autoIndentOnPaste is enabled""
This reverts commit 5c03894227.
2016-03-21 16:27:48 -07:00
Antonio Scandurra
8f2ebe8b79 🔥 2016-03-21 17:46:58 +01:00
Michelle Tilley
5c03894227 Revert "Allow pasting white space when autoIndentOnPaste is enabled"
This reverts commit 0088053de4.
2016-03-20 22:22:33 -07:00
Nathan Sobo
5aba734a41 Remove specialTokens object from TokenizedLine 2016-03-18 19:21:12 -06:00
Nathan Sobo
b0c5870425 Remove dead code from TokenizedLine 2016-03-18 18:15:41 -06:00
Nathan Sobo
1994e3b404 Remove TokenizedLine::copy 2016-03-18 18:10:04 -06:00
Nathan Sobo
462157039b Drop indentLevel and soft wrap support from TokenizedLine 2016-03-18 18:09:23 -06:00
Nathan Sobo
d62ef599cd Replace tokens with tagCodes in DisplayLayer.prototype.getScreenLines 2016-03-18 15:57:49 -06:00
Nathan Sobo
1a2f306db3 🚿 Remove commented code 2016-03-18 15:57:03 -06:00
Antonio Scandurra
0cd6bd19af Implement isWrapBoundary for DisplayLayer
So that we can correctly soft wrap CJK characters.
2016-03-18 18:30:35 +01:00
Michael Bolin
bb8f114dcb Remove an unnecessary call to then().
I see that this file has a little use of async/await and many uses of `then()`.
Things would be much less verbose and much more linear if async/await were used throughout.
Would Atom be open to a PR that changes this?

For bonus points, we could also replace `'use babel'` with `/* @flow */` at the top of the file :)
2016-03-18 09:56:33 -07:00
Antonio Scandurra
bbcbe9e809 Implement ratioForCharacter 2016-03-18 14:58:13 +01:00
Antonio Scandurra
3c70ff92f4 💚 Add TextEditor.prototype.screenLineForScreenRow
This is going to supplant our internal usage of
TextEditor.prototype.tokenizedLineForScreenRow().
2016-03-18 14:26:29 +01:00
Antonio Scandurra
d1306ae944 Remove invisibles handling from TokenizedBuffer 2016-03-18 14:09:52 +01:00
Antonio Scandurra
d666e4c008 Fix lastScreenRowForBufferRow
…which was mistakenly translating screen positions to buffer positions,
and not vice versa.
2016-03-18 11:48:52 +01:00
Antonio Scandurra
5fc699f791 Use intersecting folds when duplicating lines 2016-03-18 11:44:23 +01:00
Antonio Scandurra
d86309e46b Use DisplayLayer.prototype.foldBufferRange in Selection.prototype.fold 2016-03-18 11:33:29 +01:00
Antonio Scandurra
83da3ca440 Fix moveLineUp and moveLineDown 2016-03-18 11:24:22 +01:00
Antonio Scandurra
1d1bdf5872 Improve folds behavior when duplicating lines
Now we will select the entire screen line (which could contain some
free-form fold), and we duplicate its contents preserving the structure
of the existing folds.
2016-03-18 11:04:30 +01:00
Antonio Scandurra
43f27780fd Fix specs related to the produced HTML line output
This verifies that with the new DisplayLayer the produced output is
cleaner when tags interleave.
2016-03-17 14:56:23 +01:00
Antonio Scandurra
5efb969a63 💚 Start fixing TextEditorComponent specs 2016-03-17 11:33:17 +01:00
Antonio Scandurra
f57fb3176a Add back lineIdForScreenRow 2016-03-17 11:19:05 +01:00
Antonio Scandurra
23ddeb7f08 🔥 Put back commented out LOC 2016-03-17 10:38:23 +01:00
Antonio Scandurra
661417e362 Update lines in TextEditorPresenter.prototype.getPostMeasurementState()
Calling ::updateHorizontalDimensions might cause the editor vertical
coordinates (e.g. height, scroll top) to change, so we need to fetch
lines again from `DisplayLayer`.
2016-03-17 09:42:36 +01:00
Antonio Scandurra
2e41e9ead4 Reset DisplayLayer every time config changes 2016-03-16 19:19:00 +01:00
joshaber
15b13e3ddc Note the changes to GitRepository. 2016-03-15 10:49:36 -04:00
joshaber
8f9ab771a7 Revert "Match GitRepository's responses to null paths."
This reverts commit 50f8f8e7e9.
2016-03-15 10:44:00 -04:00
joshaber
34698d5768 Revert "And again."
This reverts commit a2a6ed05c5.
2016-03-15 10:43:57 -04:00
Nathan Sobo
e56c2addea Pass softWrapHangingIndent option 2016-03-14 20:13:00 -06:00
Nathan Sobo
8888203005 Drop marker-index dependency 2016-03-14 17:14:27 -06:00
joshaber
a2a6ed05c5 And again. 2016-03-14 16:40:55 -04:00
joshaber
50f8f8e7e9 Match GitRepository's responses to null paths.
Fixes https://github.com/atom/git-diff/issues/93.
2016-03-14 16:28:36 -04:00
Josh Abernathy
2b5a540a91 Merge pull request #11162 from atom/pr/10930
BufferedProcess: search only new data for new lines rather than entire buffer, take 2
2016-03-14 15:59:23 -04:00
Antonio Scandurra
e513ed3a11 WIP: Always enable soft-wrapping 2016-03-14 18:43:27 +01:00
joshaber
d1c8fff86c Pull line length out into its own variable. 2016-03-14 13:42:05 -04:00
joshaber
2a2e22a759 Merge branch 'master' into pr/10930 2016-03-14 13:34:03 -04:00
Lee Dohm
ed744c12a9 Move location of call to environmentHelpers.normalize 2016-03-14 08:43:16 -07:00