Commit Graph

77 Commits

Author SHA1 Message Date
Garen Torikian
b0e4ce7bb8 Update EditSession 2013-05-01 17:01:53 -07:00
Garen Torikian
34fb03fbd3 Update DisplayBuffer 2013-05-01 17:01:53 -07:00
Garen Torikian
2357f46761 Fix block comments in src 2013-05-01 16:58:43 -07:00
Nathan Sobo
0d78098dbf Make TokenizedBuffer select its own grammar, not LanguageMode
This is part of an effort to disentangle LanguageMode, DisplayBuffer,
and TokenizedBuffer. It should be easy to create a DisplayBuffer
without creating an EditSession… let's get the dependencies flowing
in a single direction.
2013-04-25 15:13:00 -06:00
Nathan Sobo
0f623b3d08 Move structural folding logic to LanguageMode
DisplayBuffer should just focus on providing basic support for folding.
Scanning the structure of the code, looking at scopes, etc is more the
domain of the LanguageMode object.
2013-04-25 14:06:53 -06:00
Nathan Sobo
ca3b0c97da 💄 getter renames 2013-04-25 14:06:52 -06:00
Garen Torikian
7940820877 Update display-buffer.coffee 2013-04-23 15:41:02 -07:00
Garen Torikian
e4eea237b5 Update display-buffer.coffee 2013-04-23 15:37:14 -07:00
Nathan Sobo
1d6c2cdf27 In documentation strings ,s/Integer/Number/g 2013-04-23 16:30:23 -06:00
Nathan Sobo
c51db80d6e Some more docs fixes
/cc @gjtorikian
2013-04-23 16:17:36 -06:00
Kevin Sawicki
eec6518278 Add package to open links on ctrl-O 2013-04-23 08:39:26 -07:00
Kevin Sawicki
a149357bd5 💄 2013-04-18 20:21:34 -07:00
Garen Torikian
5ee388cede Get it to a proper 80% 2013-04-18 18:50:22 -07:00
Garen Torikian
e478d9b7a0 Add more corrections off of the #Internal syntax 2013-04-18 13:38:26 -07:00
Garen Torikian
a50cfa26cc Updates for new biscotto 2013-04-18 13:05:40 -07:00
Garen Torikian
8bd02358d2 Should I regret a lack of better commit messages? 2013-04-12 22:35:54 -05:00
Garen Torikian
286e70cc57 Hella Editor updates 2013-04-12 15:17:11 -05:00
Garen Torikian
0c5e38680d Internalize a bunch of methods 2013-04-12 14:37:21 -05:00
Garen Torikian
bb8f5bb40c Fix errors 2013-04-11 02:29:48 -05:00
Garen Torikian
a16428c5b6 Merge master 2013-04-09 01:37:46 -05:00
Garen Torikian
d042fadab1 More updates 2013-04-09 01:18:12 -05:00
Garen Torikian
f2698bc6a9 More updates 2013-04-08 02:14:45 -05:00
Nathan Sobo
ff8491f8d3 Base cursor visibility on marker emptiness instead of tail status 2013-04-05 14:17:20 -06:00
Nathan Sobo
31579703f0 Ensure new non-empty selections have an invisible cursor. 2013-04-05 14:17:20 -06:00
Kevin Sawicki
ef9d4b392b Support passing options through DisplayBuffer.markScreenRange 2013-02-26 17:17:58 -08:00
Kevin Sawicki & Nathan Sobo
5da5bf94b6 Add 'editor:save-debug-snapshot' command. Closes #191.
This saves the state of the rendered lines, the display buffer, the
tokenized buffer, and the buffer to a file. If a problem arises with
rendering, hopefully we can use it to diagnose in which layer things
went awry.
2013-02-22 14:28:04 -07:00
Kevin Sawicki
1ab0db11bd Support folding multi-line comments 2013-02-14 10:57:39 -08:00
Nathan Sobo
3625a55f68 Update markers before triggering 'changed' events
This prevents the editor from synchronously redrawing in specs with
cursors in invalid locations. Markers are always updated under the
hood before a change event is emitted from the Buffer or DisplayBuffer.
We still wait to trigger marker observers, but if their position gets
read, it is up to date.
2013-02-12 17:09:05 -07:00
Nathan Sobo
afe0a6570a Reduce observation to single observeMarker method on display buffer
It will call the observer callbacks with the buffer and screen positions
of the head and tell each time any of these values is changed.
2013-02-04 21:24:06 -07:00
Nathan Sobo
ead93d0f39 Rename to DisplayBuffer.observeMarkerHeadPosition
When you observe, you get callbacks whenever the screen or buffer
position changes, and you get the new and old position in both 
coordinate types.
2013-02-04 11:32:47 -07:00
Nathan Sobo
df4ea9293d Build DisplayBufferMarker object to help track marker screen positions
There are 3 failures, which I think are attributable to the fact that
I'm not emitting events from the when the selection tail changes, and
I'm not emitting redundant events when the head is changed to the
same position it was previously, whereas before I wasn't guarding
against redundant events.
2013-02-02 21:11:42 -07:00
Nathan Sobo
bd96db781e Pass old/new buffer and screen positions to marker position observers
This is needed by the snippets package, which needs to know where the
cursor was previously when it moves to decide whether to cancel the
current snippet.
2013-02-02 18:00:35 -07:00
Nathan Sobo
e53403718a Tell marker head observers if a move was caused by a buffer change
This is used by cursor to only autoscroll when the marker head is
explicitly moved, so that passive movements caused by buffer insertions
don't trigger autoscrolling.
2013-02-02 16:17:14 -07:00
Nathan Sobo
bd1a100d17 Always wrap marker screen positions at soft newlines 2013-02-02 15:59:08 -07:00
Nathan Sobo
752383651d Don't add bufferChange to DisplayBuffer change events 2013-02-02 15:01:42 -07:00
Nathan Sobo
1bbb954239 EditSession specs passing after converting Selection to use markers
Still a bit of a mess though...
2013-01-31 18:26:29 -07:00
Nathan Sobo
628701fd3a Finish converting cursors to use markers.
The model layer works at least… haven't tested the view. Will test out
the view once I get the selection model working.
2013-01-31 15:52:28 -07:00
Nathan Sobo
ec521b3fd3 Add ability to cancel marker head position observations 2013-01-31 14:11:28 -07:00
Nathan Sobo
bc44540b10 Start adding ability to observe marker head positions 2013-01-31 14:00:01 -07:00
Nathan Sobo
074c1815d0 Start adding marker methods to DisplayBuffer
Whereas marker methods on buffer take for granted that everything is
in buffer coordinates, methods on the DisplayBuffer offer both
screen and buffer coordinate versions of the marker API.
2013-01-30 22:46:52 -07:00
Nathan Sobo
0e67f35748 Start on marker interface in DisplayBuffer 2013-01-30 21:04:52 -07:00
Nathan Sobo
0ecfba3262 WIP: Start adding new anchorPoint API on edit session
These will replace anchors, but they won't be stored on the Buffer
at all. The API user will access them by a returned scalar id rather
than calling methods on the returned anchor object directly.
2013-01-29 18:21:56 -07:00
Nathan Sobo
0a08d03c68 Rename Buffer, TokenizedBuffer, and Selection events 2013-01-04 13:59:11 -07:00
Nathan Sobo
fb6fe04023 Passivize more event names: 'change(d)' & 'screen-lines-change(d)' 2013-01-03 18:16:19 -07:00
Nathan Sobo
a1ae819908 Only tokenize in background if when a buffer is visible in an editor
This will prevent running a bunch of background tokenization when Atom is reloaded. We only perform tokenization to support content that is actually on screen.
2012-11-23 12:41:08 -07:00
Nathan Sobo
5aba8596a9 Make tokenization synchronous in all specs
Disabled some specs that need to make it asynchronous again… will deal with those soon.
2012-11-21 08:22:13 -07:00
Corey Johnson & Nathan Sobo
e52dbb682e WIP: Perform tokenization in chunks when edit session is shown 2012-11-19 16:50:49 -07:00
Nathan Sobo
a441ddec7c Make TokenizedBuffer emit row-oriented change events 2012-11-16 08:57:59 -07:00
Nathan Sobo
f7b1f0521a Emit row-oriented events from DisplayBuffer 2012-11-16 07:36:36 -07:00
Nathan Sobo
ea2e025400 Simplify DisplayBuffer's change event handling 2012-11-16 07:36:35 -07:00