Corey Johnson & Kevin Sawicki
3c36eaf454
Un-f spec
2013-02-08 17:28:05 -08:00
Corey Johnson
6f05e66825
Add rootView to atom spec to eliminate warnings
2013-02-08 17:28:04 -08:00
Kevin Sawicki & Nathan Sobo
641a0d43cc
Retrigger event after package module is activated
...
The event that triggers the package module to be activated is
now retriggered after the package module is initialized but without
any previously registered handlers. Instead only the handlers registered
by the package module will be triggered. The prior event handlers are then
restored after the event is retriggered.
This allows package modules to bind event handlers during initialization
that will be triggered by the same event that caused the package module
intialization to occur. This simplifies the common case of having the same
event cause a package module to initialize and attach.
2013-02-08 17:28:04 -08:00
Corey Johnson & Kevin Sawicki
3b4f07701b
Build packages using paths instead of filenames
2013-02-08 17:28:04 -08:00
Corey Johnson
a89fdd7714
Reset the loadedPackages before each test.
...
Also stop including fixturePackagesPath in configs.packageDirPaths. Instead load fixture packages as needed
2013-02-08 17:28:03 -08:00
Corey Johnson
74ae4a6413
Remove getTextMatePackages
2013-02-08 17:28:03 -08:00
Nathan Sobo
6e191aba5b
Move matching bracket insertion to bracket-matcher package
2013-02-08 09:51:31 -07:00
Nathan Sobo
4fdb1c454e
Restore marker cleanup assertions
...
Now that EditSessions clean up their markers, we can pass these tests
again.
2013-02-06 17:29:08 -07:00
Nathan Sobo
0bd98bf8f8
Do a better job cleaning up after Editors and EditSessions
...
- EditSessions destroy their Selections when they are destroyed
- Editors destroy their EditSessions when they are destroyed
- Editors unsubscribe from the document and window when they are
removed from the DOM.
- When an EditSession is destroyed via any code path, the Editor with
that EditSession removes it.
- Selections no longer trigger 'destroyed' events if their parent
EditSession has already been destroyed.
These are all really intertwined, so I'm doing them as one commit
since that was the only way to keep the specs green.
2013-02-06 16:54:19 -07:00
Kevin Sawicki & Nathan Sobo
59d0742c17
Remove Anchor and AnchorRange. They're fully replaced by markers.
...
We're still leaking markers for selections and cursors. We need to
clean that up before merging.
2013-02-05 18:15:48 -07:00
Kevin Sawicki & Nathan Sobo
13183639b6
Ensure the cursor becomes visible when the selection is emptied
...
(Even if the cursor doesn't move)
2013-02-05 17:06:56 -07:00
Kevin Sawicki & Nathan Sobo
85111748ec
Reset spy in spec before making next assertion
2013-02-05 16:34:36 -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
Kevin Sawicki & Nathan Sobo
75e040b73b
Merge remote-tracking branch 'origin/dev' into markers
...
Conflicts:
src/app/editor.coffee
2013-02-05 16:07:05 -07:00
Kevin Sawicki & Nathan Sobo
94d1edcc06
Add EditSession.selectMarker
2013-02-05 15:54:20 -07:00
Kevin Sawicki & Nathan Sobo
c893f0c338
Add Buffer.markersForPosition
and coerce marker ids to strings
2013-02-05 15:50:54 -07:00
Kevin Sawicki & Nathan Sobo
240e893d33
Don't emit a cursor-moved event when only the tail of the marker moves
2013-02-05 15:19:10 -07:00
Kevin Sawicki
3e84e9886c
Break out event handler setup into separate method
...
This mirrors the keymap setup method and allows specs
to reattach handlers after calling shutdown()
2013-02-05 13:17:53 -08:00
Kevin Sawicki
ba811c4119
Un-f a window spec
2013-02-05 12:59:26 -08:00
Justin Palmer
8512bee6c9
merge dev, fix conflicts
2013-02-05 12:42:44 -08:00
Nathan Sobo
1d30605f7f
Convert selection and cursor fully over to markers.
2013-02-05 13:39:00 -07:00
Kevin Sawicki
8de45ccc21
Bind meta-D to duplicate line below
...
Refs #134
2013-02-05 12:16:50 -08:00
Kevin Sawicki
ad3c18077c
Compare against EOF position when clipping
...
Previously the column could potentially be set to
zero since a Math.min comparison was used for the
length of an already adjusted row.
2013-02-05 12:08:17 -08:00
Justin Palmer & Nathan Sobo
65927ea0cf
fix window blur and focus events
2013-02-05 12:03:56 -08:00
Justin Palmer
22770bd663
add onBlur and onFocus events for the window
...
This allows us to simulate those events and test for them easier
2013-02-05 10:53:35 -08: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
58450d6a65
Give Buffer only a single observeMarker
method
...
It will fire the callback whenever the marker's head or tail position
changes, and it's up to the subscriber to use the information how they
want to.
2013-02-04 20:35:30 -07:00
Nathan Sobo
852b4c2f8a
Merge remote-tracking branch 'origin/dev' into markers
2013-02-04 20:04:01 -07:00
Justin Palmer
eb8d6f9766
fix textmate editor specs
2013-02-04 17:07:27 -08:00
Justin Palmer
4350be62c6
💀 is-focused.
...
targeting blurred state instead so normal state styles don't need a
special prefix
2013-02-04 16:02:09 -08:00
Justin Palmer
7a2a02dacf
Merge pull request #227 from github/cut-dat-fat
...
Reusable styles for common UI elements
2013-02-04 15:39:22 -08:00
Kevin Sawicki
bef965d863
Add line number padding to expected width
2013-02-04 15:35:40 -08:00
Kevin Sawicki
bd88a0de15
Support CSON config file
...
Use ~/.atom/config.cson as the new default when no
config file exists.
~/.atom/config.json is still the default if they both
exist.
2013-02-04 12:38:00 -08:00
Kevin Sawicki
cd07ec841d
Add more window globals and shims in task shell
...
This allows jQuery to be successfully loaded from a web worker
since it does not have a document or window object by default.
Previously it would log about missing methods and properties.
Closes #228
2013-02-04 11:43:58 -08: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
44e48d42ea
Add Buffer.observeMarkerRange
2013-02-04 11:27:39 -07:00
Kevin Sawicki
84feaf369d
Format undefined array values as null
2013-02-04 09:08:00 -08:00
Kevin Sawicki
f65e83fe2a
Add spec for converting CSON back to object
2013-02-04 09:08:00 -08:00
Kevin Sawicki
ffc65b3735
Add more CSON specs
2013-02-04 09:08:00 -08:00
Jon Rohan
3cf07d29f3
Changing the if-focused event binding to blur.
2013-02-03 09:01:27 -08: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
e25d83ccbc
Use new addEqualityTester
method to employ _.isEqual in specs
2013-02-02 17:58:39 -07:00
Nathan Sobo
d144dd4efe
Merge branch 'dev' into better-anchors
2013-02-02 17:03:57 -07:00
Nathan Sobo
94f1630152
Bind window focus
and focusout
events separately to fix spec
2013-02-02 17:02:07 -07:00
Nathan Sobo
7867d0cb3b
Fix spec for 'focused' to 'is-focused' class rename.
2013-02-02 16:55:51 -07:00
Nathan Sobo
abafb541df
Merge remote-tracking branch 'origin/dev' into better-anchors
2013-02-02 16:47:09 -07:00
Nathan Sobo
aa076a0bf2
Remove focused specs
2013-02-02 16:45:15 -07:00
Nathan Sobo
80b39ae263
Replace mentions of 'anchor' with 'tail' in selection and its spec
2013-02-02 16:44:13 -07:00
Nathan Sobo
6beee10160
Replace anchor w/ marker in selection destruction spec
2013-02-02 16:41:57 -07:00
Nathan Sobo
12425b796c
Tweak specs now that buffer changes don't autoscroll the cursor
2013-02-02 16:34:28 -07:00