Kevin Sawicki
9abc4580f4
Don't recompute pair boolean when building token
...
Pass in hasPairedCharacter to the Token constructor when it is
being broken out from the parent token instead of recomputing it.
2014-10-28 18:15:13 -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
3ba44b955d
Deprecate Token::scopes
2014-10-13 17:12:35 -07:00
Ben Ogle
b1e9e6b312
Deprecate the use of scopes.
2014-10-13 16:52:49 -07:00
Ben Ogle
22e43600d2
Fix Token::isEqual() to accept scopes for now.
2014-10-13 16:51:10 -07:00
Ben Ogle
c0091b4601
scopes -> scopeDescriptor
...
!!!
2014-10-13 16:30:41 -07:00
Kevin Sawicki
878da262d2
Add support for Unicode variation sequences
...
These are character pairs that should be treated as tokens with a
buffer delta of 2 and a screen delta of 1.
2014-09-17 10:17:26 -07:00
Kevin Sawicki
b281737838
Add leading/trailing classes to hard tab tokens
...
Previously the leading-whitespace and trailing-whitespace classes
were never added to tokens that were hard tabs.
2014-09-17 09:42:31 -07:00
Desmond Brand
6b5d16173b
💄 more lint rules
2014-08-15 15:55:22 -07:00
Nathan Sobo
6c52bcf20c
Assign ::firstNonWhitespace/TrailingWhitespaceIndex in Token::split
...
Fixes #3277
2014-08-15 12:58:27 -06:00
Nathan Sobo
c74f6bb615
Remove handling of invisibles from EditorComponent
2014-08-13 16:31:40 -06:00
Nathan Sobo
052f9580f2
Render correct classes on leading/trailing whitespace spans
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
probablycorey
6e102c7e1e
Rename regex var to a more appropriate name
2014-06-23 10:51:58 -07:00
Kevin Sawicki
de132d79a4
Add parens for clarity
2014-06-18 17:16:50 -07:00
Kevin Sawicki
5af181ffb5
Default column to 0
2014-06-18 17:11:34 -07:00
Kevin Sawicki
e4fd80399d
Add token value directly to column
2014-06-18 16:41:10 -07:00
Andrew Stubbs
1fe6c498ac
Make hard tabs align to columns.
2014-05-14 13:31:03 +01:00
Nathan Sobo
ae9f79bfc4
Only add indent guide to trailing whitespace on whitespace-only lines
2014-04-22 17:09:44 -06: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
Nathan Sobo
9bdc78df2e
Correctly render lines containing only whitespace
2014-04-22 17:09:40 -06:00
David Graham & Nathan Sobo
6b10fcc2f8
Rely on token's knowledge of its own leading/trailing whitespace status
...
Previously, we were determining this at render time. But its baked into
the state of tokens when TokenizedLines are constructed now so we no
longer need to compute it when rendering.
2014-04-22 17:09:39 -06:00
David Graham & Nathan Sobo
b4af0a79d0
Mark tokens with leading/trailing whitespace when building TokenizedLine
2014-04-22 17:09:39 -06:00
David Graham & Nathan Sobo
616b9e4b7d
💄 Rename breakOutLeadingWhitespace to breakOutLeadingSoftTabs
2014-04-22 17:09:39 -06:00
Kevin Sawicki
227454e27e
Remove ### style visibility comments
2014-02-06 10:40:45 -08:00
Kevin Sawicki
932a792289
Remove Private: prefix
2014-02-06 10:02:53 -08:00
Ben Ogle
b959fc0a6a
use @
2013-12-16 15:46:07 -08:00
Ben Ogle
77b5fd47ca
Dont re-atomicize atomic tokens.
...
Fixes #1318
2013-12-16 15:34:27 -08:00
Kevin Sawicki
365d69a19c
Add missing s to invisible
2013-12-06 08:26:59 -08:00
Kevin Sawicki
776b267396
💄 Correct indent
2013-12-06 08:26:59 -08:00
Kevin Sawicki
77e4b7f90f
Use value ivar when invisible.tab is falsy
2013-12-06 08:26:59 -08:00
Kevin Sawicki
32d301ef34
typo: invisibles not invisible
2013-12-06 08:26:59 -08:00
Kevin Sawicki & Nathan Sobo
7ae432fad5
Place entire hard tab value inside span
...
Previously only the first character was included in the span.
2013-12-06 08:26:59 -08:00
probablycorey
d21a5a6836
Use string concatenation instead of array concatenation
2013-10-21 15:17:41 -07:00
probablycorey
02dd79feeb
Use module variable naming conventions
2013-10-18 15:36:25 -07:00
probablycorey
ff5ee45dc7
Fix return value for getValueAsHTML
2013-10-18 13:53:11 -07:00
probablycorey
fd062a7c4f
Split long spans into multiple spans
...
If a span has more than 2^16 chars and has the style `white-space: pre` Chrome
won't render it.
2013-10-18 11:44:56 -07:00
Kevin Sawicki
216a5e61fd
Update underscore-extensions requires
2013-10-15 13:50:16 -07:00
Ben Ogle
bd8c14355c
Move regexes out into variables
2013-10-07 10:28:12 -07:00
Ben Ogle
1a6884ff71
Remove the ALL_CAPS vars replace with CapCamelCase
2013-10-07 10:28:11 -07:00
Ben Ogle
156b6a9490
Make wrapCharacters -> escapeString. Use a regex.
...
The `htmlForScreenRows` benchmark went from ~3.5 ms to ~2.9ms for a
call to htmlForScreenRows over the entire screen range.
🐎
2013-10-07 10:28:11 -07:00
Ben Ogle
5a772d7078
Move back to the node walker and Range()
...
This is slower than the span compute, but rendering lines without
tons of spans is much faster than with
2013-10-07 10:28:11 -07:00
Ben Ogle
8a3f137519
Speed up token html generation. 20ms -> 6ms
...
Character replace was most of it. Removing regex creation, array
creation and joins seems to reduce the GC pressure. Calling 500 times,
GC spent 100ms less time.
2013-10-07 10:28:10 -07:00
Ben Ogle
914288ab86
Wrap each char in a span; compute left position by measuring each span.
...
This is is faster and simpler than the old method. Running each function
20,000 times yielded these results:
Old: 3750ms
This method: 1523ms
By looking up each char's width in a dict: 29ms
2013-10-07 10:28:08 -07:00
Kevin Sawicki
41fc4f7fe6
Use relative require paths in src/ files
2013-09-20 10:02:20 -07:00
Matt Colyer
8e2777ccc0
Get class visibility correct
2013-08-27 10:16:59 -07:00
Kevin Sawicki
76332c76bd
Flatten src directory
...
* Move src/app to src/
* Move src/stdlib to src/
* Remove src/app and src/stdlib from NODE_PATH
2013-08-19 20:13:57 -07:00