Commit Graph

101 Commits

Author SHA1 Message Date
Nathan Sobo
1223d7a154 Process closing scopes at wrap boundaries 2015-08-11 13:13:30 -06: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
4812dcc355 Include invisibles in TokenizedLine::copy 2015-06-02 00:02:34 +02:00
Nathan Sobo
865015e47d Correctly compute bufferDelta for last soft wrap line segment
Fixes #6885
2015-05-21 19:56:53 +02:00
Nathan Sobo
321d310e8a Avoid more allocations in transformContent 2015-05-21 19:56:53 +02:00
Nathan Sobo
b4444df442 Minimize substring calls and concatenation in transformContent 2015-05-21 19:56:53 +02: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
2beb6c0fe0 Pass TokenIterator reference instead of using global singleton
Adds an extra reference to each tokenized line but is also more sane.

/cc @maxbrunsfeld
2015-05-20 19:29:38 +02:00
Nathan Sobo
a109b3811c Add TokenizedLine::getTokenIterator
This will not be part of the public API but will replace another
non-public API usage in autocomplete-plus.
2015-05-19 23:19:45 +02:00
Nathan Sobo
1923033198 Fix spurious lint error by rearranging syntax 2015-05-16 00:12:43 +02:00
Nathan Sobo
64c0ef8bd8 Remove more usages of tokens shim 2015-05-14 01:46:49 +02:00
Nathan Sobo
0eb97e6a96 Use TokenIterator for position translation 2015-05-14 00:33:27 +02:00
Nathan Sobo
da2df2297a Add a TokenIterator and use it for tokens shim 2015-05-14 00:15:31 +02:00
Nathan Sobo
a7550666dd Remove dead code 2015-05-13 22:50:05 +02:00
Nathan Sobo
dc473698a9 🎨 2015-05-13 22:03:29 +02:00
Nathan Sobo
00b30f7db8 Remove some dead code 2015-05-13 22:03:26 +02:00
Nathan Sobo
d7f5588904 Generate line HTML based on tags instead of tokens
This avoids creating a bunch of tokens as temporary objects since they
are no longer stored.
2015-05-13 21:57:53 +02:00
Nathan Sobo
6b51b5d02a Rename parentScopes to openScopes 2015-05-13 21:17:46 +02:00
Nathan Sobo
bf6754981b decodeContent -> decodeTokens 2015-05-13 21:17:46 +02:00
Nathan Sobo
8ab9a9f9bb Account for softWrapIndent when assigning indices on soft wrap line 2015-05-13 21:17:46 +02:00
Nathan Sobo
d90d1f0ea7 Don’t build ::specialTokens unless properties are provided 2015-05-13 21:17:45 +02:00
Nathan Sobo
6befa0200f Assign ::isHardTab to shim tokens 2015-05-13 21:17:45 +02:00
Nathan Sobo
75112a017d Fix assignment of last non-whitespace column for paired characters 2015-05-13 21:17:45 +02:00
Nathan Sobo
2afe013f9e Assign ::hasInvisibleCharacters on Token shims 2015-05-13 21:17:45 +02:00
Nathan Sobo
77e8a906c2 Fix soft wrapping with tags array, including soft-wrap indent 2015-05-13 21:17:45 +02:00
Nathan Sobo
70eb7f77b0 Drop unused methods 2015-05-13 21:17:45 +02:00
Nathan Sobo
a8d01bcec1 Fix bufferRangeForScopeAtPosition with new tags array scheme 2015-05-13 21:17:45 +02:00
Nathan Sobo
24967afed1 Substitute invisibles in initial scan 2015-05-13 21:17:45 +02:00
Nathan Sobo
6274ac25fa Fix TokenizedLine::copy for new representation 2015-05-13 21:17:44 +02:00
Nathan Sobo
f3f609861e Make TokenizedLine::softWrapAt work with new token representation 2015-05-13 21:17:44 +02:00
Nathan Sobo
9d93d18a8f Mark leading/trailing whitespace in new TokenizedLine representation 2015-05-13 21:17:44 +02:00
Nathan Sobo
9554bfd393 Break out hard tabs and paired characters from numeric tag arrays 2015-05-13 21:17:44 +02:00
Nathan Sobo
43806d6416 Break out leading soft tabs after switching to numeric tag arrays 2015-05-13 21:17:44 +02:00
Nathan Sobo
06b5d27357 Adapt to first-mate returning purely numeric tag arrays 2015-05-13 21:17:44 +02:00
Nathan Sobo
9583ff04e6 WIP: Start integrating with nested words version of first-mate 2015-05-13 21:17:44 +02:00
Machiste Quintana
5d2392ea67 👕 Fix new coffeelint errors 2015-04-06 23:59:54 -04:00
Nikolaus Wittenstein
5a3f2035a1 Replace skipAtomicTokens with clip
When clipping a screen position, callers used to have to pick between
clipping to the left edge or the right edge when the position was in the
middle of an atomic token. This change allows them to choose the closest
edge, and makes this the default.

This makes selecting hard tabs (or any other atomic tokens) work in a
similar manner as in other text editors; that is, when clicking near
the middle of a tab, the insertion point will move to the closest edge
rather than the left edge.
2015-03-29 19:43:25 -04:00
Nikolaus Wittenstein
372fb49c88 TokenizedLine::screenColumnForBufferColumn calculates more accurately
screenColumnForBufferColumn used to break only if the current column
was strictly greater than the target column. This commit changes it so
it breaks when greater or equal, which is how bufferColumnForScreenColumn
works.

This also adds some unit tests for screenColumnForBufferColumn's
interactions with hard tab characters.
2015-03-29 19:43:25 -04:00
Kevin Sawicki
ec0681ed36 Merge pull request #6038 from atom/ks-remove-unwanted-loop-returns
Remove unwanted loop returns
2015-03-19 14:16:26 -07:00
Nathan Sobo
2bfd30c832 Revert "Revert "Don't soft-wrap on indentation"" 2015-03-19 14:37:39 -06:00
Kevin Sawicki
d9a5aff919 Add explicit return after for loop 2015-03-19 11:48:40 -07:00
Nathan Sobo
6345799cf3 Revert "Don't soft-wrap on indentation" 2015-03-19 12:47:58 -06:00
Antonio Scandurra
0e0eeb3426 🔥 Delete TokenizedLine#isColumnOutsideIndentation 2015-03-19 12:23:10 +01:00
Antonio Scandurra
03b526a76b 🎨 Use only @firstNonWhitespaceIndex 2015-03-19 11:52:10 +01:00
Antonio Scandurra
56020b11b0 🐛 Avoid soft-wrapping on indentation 2015-03-19 11:36:55 +01:00
Antonio Scandurra
522e82ebf1 🎨 Refactor buildSoftWrapIndentationTokens
...as suggested by @nathansobo 
2015-03-18 18:07:07 +01:00
Antonio Scandurra
f5e1e40edd Avoid named parameter to save an allocation 2015-03-18 17:44:35 +01:00
Antonio Scandurra
7c33b9bf41 🎨 Rename to softWrapHangingIndent 2015-03-18 14:18:27 +01:00
Antonio Scandurra
ae2c92a1dc 📝 2015-03-18 11:29:39 +01:00