Commit Graph

115 Commits

Author SHA1 Message Date
Max Brunsfeld
38849474d0 Merge branch 'master' into ns-mb-detangle-editor 2016-08-10 13:23:32 -07:00
Antonio Scandurra
23f421154e Delete TokenizedBuffer.prototype.onDidChange
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-08-10 17:52:49 +02:00
Max Brunsfeld
f3d486eb9c Merge branch 'master' into ns-mb-detangle-editor 2016-08-02 14:12:18 -07:00
Nathan Sobo
2b5f1bda46 Always seek to specified position in TokenizedBufferIterator
Fixes #10350

Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-08-02 12:19:45 -06:00
Max Brunsfeld
e6c83521c9 Move grammar serialization logic to TextEditorRegistry 2016-07-27 13:10:23 -07:00
Max Brunsfeld
caab1dda63 Move grammar-used spec to workspace-spec
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-07-26 15:38:53 -07:00
Max Brunsfeld
d203610986 Set grammar manually in tokenized buffer specs
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-07-26 15:08:59 -07:00
Max Brunsfeld
c0cbb59666 Don't use config in TokenizedBuffer 2016-07-12 14:31:05 -07:00
Wliu
9b70066bed Fix TokenizedBuffer specs? 2016-05-04 17:28:15 -04:00
Antonio Scandurra
a532000af4 Handle only buffer coordinates in TokenIterator 2016-04-07 13:39:13 +02:00
Antonio Scandurra
bef7539e34 Refactor DisplayBuffer to DecorationManager
This commit moves all the remaining concerns not related to decorations
out of `DisplayBuffer` and into `TextEditor`. This means the
`DisplayBuffer` is now free to be renamed to `DecorationManager`.
2016-04-05 18:43:08 +02:00
Antonio Scandurra
544b75c7b0 🔥 💚 Fix TokenizedBuffer specs 2016-04-05 12:19:45 +02:00
Antonio Scandurra
80b956e996 💚 Fix TextDecorationLayer API specs in TokenizedBuffer 2016-04-05 11:39:06 +02:00
Antonio Scandurra
dfed7c4537 Merge branch 'master' into ns-use-display-layers
# Conflicts:
#	package.json
#	src/display-buffer.coffee
#	src/text-editor.coffee
#	src/tokenized-buffer.coffee
2016-03-10 13:53:14 +01:00
Antonio Scandurra
bea324eae9 🔥 Use just isFoldableAtBufferRow 2016-02-17 15:05:31 +01:00
Antonio Scandurra
90c75fd6da Delete specs testing previous behavior
When emitting the `did-change` event, `updateFoldableStatus` used to extend the
change region up and down to include all the lines that changed their
foldability status because of a buffer change. I assume this was supposed to
invalidate folds that *contained* the change whenever a line was edited in a way
that affected also the previous or subsequent ones.

That information, however, is not being used by `DisplayBuffer`, which does not
alter existing folded regions when they become invalid.

I believe the correct behavior should be to unfold the invalid region and
recompute those screen lines. Nonetheless, it seems reasonable to me to keep the
original (wrong) behavior and not address it in this branch, because it strays
from the original intent of this refactoring.

We should probably fix it once for all in another PR or when
integrating/implementing `DisplayLayer`.
2016-02-17 14:35:22 +01:00
Antonio Scandurra
a613fa5133 Adapt specs to use the new API 2016-02-17 11:17:24 +01:00
Antonio Scandurra
2c71a448b3 Put foldable specs back 2016-02-17 11:04:19 +01:00
Antonio Scandurra
0afa9bb21c Don't update foldable status, ever 2016-02-17 10:34:21 +01:00
Nathan Sobo
0243a345b7 Merge branch 'master' into ns-use-display-layers 2016-02-09 12:42:57 -07:00
Wliu
5127789a68 Update tokenized buffer spec 2016-02-07 21:26:13 -05:00
Wliu
b4f8bf12cb 💚 Fix Tokenized Buffer spec 2016-02-04 14:34:49 +00:00
Nathan Sobo
d0e29bfc2c Avoid recursive call to moveToSuccessor, which is blowing the stack 2016-01-26 17:42:28 -07:00
Nathan Sobo
0d55a0bd76 Make TokenizedBuffer conform to text decoration layer interface 2016-01-13 18:22:04 -07:00
Antonio Scandurra
19ff676c7b Serialize grammar for untitled buffers 2015-12-16 10:35:23 +01:00
Antonio Scandurra
8db49fc08d Document existing behavior 2015-12-15 17:20:01 +01:00
Antonio Scandurra
a8a9581ef4 🎨 Use only id 2015-12-07 19:57:30 +01:00
Antonio Scandurra
f7a4ef4a84 Deserialize also untitled buffers 2015-12-07 14:47:23 +01:00
Wliu
ecd14f3390 💚 let and var are now storage.type.var.js
Refs atom/language-javascript#277
2015-12-02 20:47:27 -05:00
Wliu
3a34a95947 Update TokenizedBuffer specs 2015-11-17 12:47:14 -05:00
Wliu
7db555c96b Fix core specs 2015-11-06 10:26:36 -05:00
Antonio Scandurra
df2d73a8df Don't use atom globals in TokenizedBuffer 2015-10-07 15:25:02 -05:00
Nathan Sobo
122bf72c75 Don’t use atom.packages global in TokenizedBuffer 2015-10-07 15:25:00 -05:00
Nathan Sobo
b2359f44a6 Don’t use atom.grammars global in TokenizedBuffer 2015-10-07 15:25:00 -05:00
Nathan Sobo
4f65452902 Don’t use atom.config global in TokenizedBuffer 2015-10-07 15:24:59 -05:00
Nathan Sobo
eb2ace37b4 Move TextEditor construction to Workspace
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2015-10-07 15:24:56 -05:00
Nathan Sobo
eb4944b07d Make bufferRangeForScopeAtPosition work with last column of scope 2015-08-10 14:21:23 -06:00
Joe Fitzgerald
b3b046aa66 Add activationHooks To package.json
- Trigger the `{grammar-package-name}:grammar-used` hook when grammar is set for tokenized-buffer
2015-07-09 02:33:17 -04:00
Nathan Sobo
36d55c9384 Don’t break out soft tabs that are interrupted by a scope boundary 2015-06-08 22:56:32 +02:00
Nathan Sobo
31cf19a205 Use previous definition of scope selector match to fix API breakage
I switched to first-mate Selector because I didn’t want to replicate
the poorly-defined Token::matchesScopeSelector method now that tokens
are not stored on lines. However, the first-mate semantics are stricter
and that broke the API. Perhaps using selector-kit here would be better,
but I just wanted to put back exactly to how it was for now.

/cc @ypresto
2015-05-28 10:38:35 +02:00
Machiste Quintana
d5bcc0433d WIP: 👕 Fix linter errors 2015-05-22 16:29:12 -04:00
Nathan Sobo
2379b3803f Revert "Revert "Merge pull request #6757 from atom/ns-less-memory-for-tokens""
This reverts commit 7cb0bc3bc2.
2015-05-21 19:56:52 +02:00
Nathan Sobo
7cb0bc3bc2 Revert "Merge pull request #6757 from atom/ns-less-memory-for-tokens"
This reverts commit 0cd1f110b5, reversing
changes made to d75d202d33.

Conflicts:
	package.json
2015-05-21 16:25:23 +02:00
Nathan Sobo
e694b18ae2 Merge branch 'master' into ns-less-memory-for-tokens
Conflicts:
	spec/tokenized-buffer-spec.coffee
	src/tokenized-buffer.coffee
2015-05-14 18:55:16 +02:00
Nathan Sobo
ac5a5d5ba0 Remove unused TokenizedBuffer methods that relied on tokens shim 2015-05-14 17:51:46 +02:00
Max Brunsfeld
19d905606b Avoid double computation of screen lines when opening files
Previously, instantiating a TextEditor would always compute compute
screen lines twice: once when the DisplayBuffer was instantiated,
and once when the 'invisibles' property was set on the DisplayBuffer.
2015-05-13 19:59:25 -07:00
Nathan Sobo
a8d01bcec1 Fix bufferRangeForScopeAtPosition with new tags array scheme 2015-05-13 21:17:45 +02:00
Nathan Sobo
6eb61d977d Delete spec that’s no longer relevant 2015-05-13 21:17:45 +02:00
Machiste Quintana
5d2392ea67 👕 Fix new coffeelint errors 2015-04-06 23:59:54 -04:00
Kevin Sawicki
cd5adb6ab7 Clear invalid rows when short-circuiting for null grammar 2015-03-17 17:41:22 -07:00