Commit Graph

79 Commits

Author SHA1 Message Date
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
Nathan Sobo
0bf0c0527f Don’t tokenize spaces preceding combining chars as leading whitespace
Fixes #5349
2015-02-24 12:10:25 -07:00
Nathan Sobo
f326c818fd Update .foldable on tokenized lines based on indentation 2015-02-06 18:54:13 -07:00
Nathan Sobo
0081fa283e Cache .foldable on tokenized lines based on block comments
Still need to handle indentation
2015-02-06 14:53:07 -07:00
Nathan Sobo
d53d01d95b Replace atom.syntax with atom.grammars 2014-11-20 11:42:49 -07:00
Ben Ogle
16ad957609 scopeDescriptor -> scopes
Now that we have a real ScopeDescriptor object, 
these should change back!
2014-10-21 11:38:43 -07:00
Ben Ogle
c0091b4601 scopes -> scopeDescriptor
!!!
2014-10-13 16:30:41 -07:00
Ben Ogle
969ca048e8 Fix specs 2014-09-29 16:08:03 -07:00
Ben Ogle
289b22c782 Use event methods in TokenizedBuffer spec 2014-09-05 12:40:14 -07:00
Ben Ogle
a2adbff3e9 Add TokenizedBuffer::onDidTokenize 2014-09-05 12:33:28 -07:00
Ben Ogle
99f899dc4a lineForScreenRow -> tokenizedLineForRow
The method was severely mislabeled
2014-09-03 14:42:45 -07:00
Nathan Sobo
6c52bcf20c Assign ::firstNonWhitespace/TrailingWhitespaceIndex in Token::split
Fixes #3277
2014-08-15 12:58:27 -06:00
Nathan Sobo
20daed176b Don't show invisibles in mini editors
This moves observation of the config keys to Editor, which assigns the
invisibles hash or null on the TokenizedBuffer via the DisplayBuffer to
control whether we render invisibles or not.
2014-08-13 16:32:14 -06:00
Nathan Sobo
742ec6df0d Determine the endOfLineInvisibles for each TokenizedLine 2014-08-13 16:31:39 -06:00
Nathan Sobo
864f9bc2b4 Preserve hasLeading/TrailingWhitespace when copying lines w/ invisibles
This fixes the styling of the leading whitespace of folded lines
2014-08-13 16:31:39 -06:00
Nathan Sobo
73896d100e Add specs for firstNonWhitespaceIndex and firstTrailingWhitespaceIndex 2014-08-13 16:31:39 -06:00
Nathan Sobo
2daf70f0e5 Handle invisibles at the token level to fix char width measurement
Fixes #3188
2014-08-13 16:31:39 -06:00
Nathan Sobo
2878196e0a Make React editor indent guide work like it did in the old editor
Fixes #2367

* The indent level of empty lines is the *max* of the nearest non empty
  line, rather than favoring the level of the line below.

* An extra wrap guide is no longer rendered for empty lines

I didn't port the specs over because we already had good coverage at the
model level. It just needed to be updated for the preferred behavior.
2014-07-07 17:59:26 -06:00
Ben Ogle
1fa6661efd Remove the awkward _.pick 2014-07-01 11:48:36 -07:00
Ben Ogle
718e1228bd Add checks for the change event 2014-07-01 11:32:04 -07:00
Ben Ogle
3e57fb8e9a 💄 naming 2014-07-01 10:59:42 -07:00
Ben Ogle
de0e945c5c More specs in tokenized buffer testing empty line retokenizing 2014-07-01 10:54:37 -07:00
Nathan Sobo
71fb063a67 Un-f 2014-06-28 15:24:24 +01:00
probablycorey
e7aef25f1f Update tokenized buffer specs 2014-06-27 10:18:04 -07:00
probablycorey
071b391994 Describe surrogate pair as UTF-8 surrogate pair 2014-06-27 10:17:28 -07:00
Kevin Sawicki
fe2cb046c3 Verify token screen and buffer delta 2014-06-18 17:26:38 -07:00
Kevin Sawicki
355f54ba00 Test odd-numbered tab length alignment 2014-06-18 17:10:10 -07:00
Kevin Sawicki
c4c5d72bf1 Test multiple tab stops per line 2014-06-18 16:37:23 -07:00
Kevin Sawicki
0504244066 Test multiple tab lengths 2014-06-18 16:25:31 -07:00
Kevin Sawicki
8560526158 Add initial spec of hard tabs aligning 2014-06-18 16:24:35 -07:00
probablycorey
c9ae9e11c1 Reword specs 2014-05-28 16:34:42 -07:00
probablycorey
b7df08cbdd Add spec to re-emit the tokenized event when the grammar is changed 2014-05-28 16:10:02 -07:00
probablycorey
89dc5f26ad Only emit the tokenized event after the first full tokenization 2014-05-28 15:56:08 -07:00
probablycorey
2c60b0463e Use tokenized buffer created by editor 2014-05-28 15:46:26 -07:00
probablycorey
c56ac70181 Add tokenized event to tokenized buffer 2014-05-28 14:53:38 -07:00
Nathan Sobo
28dd7d4acd Treat all whitespace lines as not having leading whitespace
Instead it's treated as all trailing whitespace, as it was originally.
2014-04-22 17:09:41 -06:00
David Graham & Nathan Sobo
6997adece9 Associate TokenizedLines with an ::indentLevel
This can be used to render the appropriate number of indent guide spans
for empty lines.
2014-04-22 17:09:39 -06:00