Corey Johnson & Nathan Sobo
8437f3ff7f
Only load TextMate packages as needed in specs
...
Also: when a TextMate package is deactivated, remove its grammars
2013-03-26 17:35:42 -06:00
Kevin Sawicki & Nathan Sobo
1d1ba5f6d1
Use node's require instead of internal require
2013-03-12 10:38:05 -07:00
Kevin Sawicki
2212222c47
Use underscore node module
2013-03-11 11:22:36 -07:00
Nathan Sobo
54fc9efdcb
Eliminate fixturesProject global. Use project global instead.
2013-03-07 09:30:27 -08:00
Nathan Sobo
beaeac4425
Rename buildEditSessionForPath to buildEditSession
...
Since this is the more external method, having a shorter name
is more convenient. The former `buildEditSession` method took a
Buffer, and is now called `buildEditSessionForBuffer`.
2013-03-07 09:28:51 -08:00
Corey Johnson & Kevin Sawicki
7eee81cd6a
Return early when clipping tokenless screenline
...
Closes #337
2013-03-05 10:44:15 -08:00
Kevin Sawicki & Nathan Sobo
42fe87a9a2
Notify observers when display buffer markers are invalidated
2013-02-26 14:59:09 -08: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
Kevin Sawicki & Nathan Sobo
5a1de9fa44
Add specs for truthiness of marker position assignment return values
2013-02-05 16:33:59 -07:00
Nathan Sobo
1d30605f7f
Convert selection and cursor fully over to markers.
2013-02-05 13:39:00 -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
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
aa076a0bf2
Remove focused specs
2013-02-02 16:45:15 -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
3d8406f5a3
Clip screen positions before translating to buffer positions
2013-02-02 15:07:17 -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
Corey Johnson & Kevin Sawicki
4db876aed1
Deleting before fold no longer unfolds after undo
...
Use same row delta computation for updating start and
end rows in folds.
2013-01-30 09:10:26 -08:00
Nathan Sobo
fb6fe04023
Passivize more event names: 'change(d)' & 'screen-lines-change(d)'
2013-01-03 18:16:19 -07:00
Nathan Sobo
39863e4ebe
💄
2012-11-23 10:48:00 -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
Corey Johnson & Nathan Sobo
b8beec6f55
Remove foldable from ScreenLine
2012-11-06 11:41:48 -08:00
Nathan Sobo
00bcb7a1b9
Make position translation understand hard tabs
2012-11-01 07:15:51 -06:00
Nathan Sobo
3d12269315
DisplayBuffer specs passing with greatly simplified LineMap
2012-11-01 07:15:51 -06:00
Corey Johnson
e2a917fcf3
Change tabText to tabLength
2012-10-18 11:31:39 -07:00
Corey Johnson & Nathan Sobo
12b06ddf0c
Get spec suite running (lots of failures)
2012-08-27 17:36:36 -05:00
Nathan Sobo
c2c8724ad0
Initial commit
2012-08-10 13:32:19 -06:00
Corey Johnson
114847fb0f
Update display buffer spec
2012-08-02 10:25:55 -07:00
Corey Johnson & Nathan Sobo
3a5e73aa77
Merge branch 'making-folding-better'
2012-07-30 13:43:47 -07:00
Corey Johnson & Nathan Sobo
f7614c210a
Add unfold-all and bind it to ctrl-}
2012-07-30 12:11:54 -07:00
Corey Johnson & Nathan Sobo
a7db67e68d
When DisplayBuffer.foldBufferRow is called with a buffer row that is within a fold, it folds the scope that incloses the buffer row's fold
2012-07-30 11:46:43 -07:00
Corey Johnson & Nathan Sobo
9622d6f9b3
Rename un/foldScopeContainingBufferRow to un/foldBufferRow.
...
Scope containing buffer row was a misnomer. Waiting until I implement the repeat folding feature before considering a better name.
2012-07-30 10:25:53 -07:00
Corey Johnson
69d7ff0a55
add unfold to display buffer
2012-07-27 16:05:56 -07:00
Corey Johnson
76ffa5a2c5
change toggle-fold to fold
2012-07-27 13:45:13 -07:00
Nathan Sobo
3516dea210
Introduce LanguageMode wrapper for Ace modes as a foundation of our own modes
...
LanguageMode is the central point for all language-specific behavior associated with an EditSession. There is one LanguageMode instance per EditSession. LanguageMode has access to the EditSession and its TokenizedBuffer, and in reverse the EditSession, DisplayBuffer, and TokenizedBuffer also make use of LanguageMode. This is a bit incestuous, but I think it's okay because you can think of LanguageMode as a swappable strategy object that governs language-specific aspects of that constellation of objects.
2012-07-27 12:30:06 -06:00
Corey Johnson
c3d7d3566f
Buffer listens for changes to file and triggers 'contents-change' event
2012-06-29 15:09:31 -07:00
Corey Johnson & Nathan Sobo
8416dc3598
DisplayBuffer.destroyFoldsContainingBufferRow destroys all folds containing buffer row (instead of just folds starting at buffer row)
2012-06-14 13:56:08 -07:00
Nathan Sobo
b59e73edcd
Rename Renderer -> DisplayBuffer
...
The idea is that the DisplayBuffer serves a similar role to the Buffer, except that it's holding content in an arrangement that's optimized for display.
2012-06-13 21:02:30 -06:00