7345 Commits

Author SHA1 Message Date
Nathan Sobo
1c7eef89c3 Merge branch 'master' into ns-pane-splits-with-models 2014-01-10 10:40:52 -07:00
Nathan Sobo
6eacfa7077 Call Range::toString, not ::inspect in DisplayBufferMarker::inspect 2014-01-09 19:04:52 -07:00
Nathan Sobo
9aefafb831 Use PaneContainerModel::$activePaneItem for 'active-item-changed' events
Yay behaviors
2014-01-09 18:58:01 -07:00
Nathan Sobo
5a3353ec28 Add PaneContainer view to deserializers 2014-01-09 18:35:16 -07:00
Nathan Sobo
e87b8dc463 Remove focusNext/PreviousPane methods from PaneContainer view 2014-01-09 18:35:01 -07:00
Nathan Sobo
60daa483e6 Include orientation when serializing PaneAxisModel 2014-01-09 18:34:09 -07:00
Nathan Sobo
cd699d8b9b Transfer focus to the root view when the last focused pane is destroyed 2014-01-09 18:17:08 -07:00
Ben Ogle
0d2067e1a4 Merge pull request #1400 from atom/bo-fuck-rejection
Dont use reject in project::scan cancel
2014-01-09 17:09:58 -08:00
Nathan Sobo
8647137952 Remove active status management from Pane view; rely on model instead 2014-01-09 18:00:54 -07:00
Ben Ogle
fbcfad28c3 Reject is broken. Ugh. Just resolve it 2014-01-09 17:00:34 -08:00
Nathan Sobo
5e1b2e2696 Manage the active pane at the model level 2014-01-09 18:00:19 -07:00
Kevin Sawicki
20ee7b432c Wrap item in array since it is a trigger call 2014-01-09 15:18:44 -08:00
Nathan Sobo
4026e6ca5c Properly serialize pane focus state 2014-01-09 16:09:22 -07:00
Corey Johnson
378901e0d2 Merge pull request #1375 from atom/ns-fix-crash-exit
Properly exit when render process crashes if exitWhenDone option is true
2014-01-09 15:08:56 -08:00
Nathan Sobo
964abd3141 Suppress blur when replacing a pane axis with its last child
If the pane axis contains a child pane, its temporary removal from the
DOM causes a blur event that we don't want to screw up our focused
state.
2014-01-09 16:08:52 -07:00
Nathan Sobo
4dcba4bb27 Destroy remaining items when a pane is destroyed 2014-01-09 16:06:02 -07:00
Nathan Sobo
073ea84d69 Handle consequences of item removal in the model 2014-01-09 16:05:00 -07:00
Nathan Sobo
2965d2e974 Bind Pane view's focus to focus state on the model
It's a bit tricky… we don't want to blur the model when focusing the
pane's active view causes a focusout event on the pane, so we use
::suppressBlur on the model to prevent it from blurring as the focus
is transferred.
2014-01-09 16:01:52 -07:00
Nathan Sobo
a67f0d4d57 Make PaneModel::items an observable sequence 2014-01-09 15:53:52 -07:00
Nathan Sobo
5309d5f24d Add ability to suppress blur on all focusable objects in a focus context
When a view receives a 'focusout' event, we relay that to the model by
calling ::blur. This is great for when users initiate the change in
focus, but 'focusout' events can *also* be caused by elements being
temporarily detached from the DOM.

The ::suppressBlur method gives the ability to ignore blur calls during
a certain operation. This is helpful, for example, when we want to
detach a model and reattach it somewhere else without changing its focus
state.
2014-01-09 15:46:32 -07:00
Nathan Sobo
af3ca57094 Make focus state distinct until changed on Focusable objects 2014-01-09 15:43:05 -07:00
Kevin Sawicki
d96b63d791 Move enable/disable to parent Package class
This was previously unimplemented in TextMatePackage causing exceptions
when trying to enable/disable a package of that type.
2014-01-09 14:13:49 -08:00
Nathan Sobo
466868e639 Fix access to undefined root property
The ::filterDefined transform unfortunately doesn't prevent an undefined
initial value when applied to behaviors.
2014-01-09 12:19:01 -07:00
Nathan Sobo
2317c6835e At the model layer: Focus next pane when a focused pane is destroyed
This incorporates the Focusable mixin into PaneModel and ensures that
all panes in the same pane container share a single focus context.
2014-01-09 12:19:01 -07:00
Nathan Sobo
4e99d003ee Add Focusable mixin and FocusContext
Focusable objects have ::focus and ::blur methods and a ::focused
property. Focusable objects can be assigned a ::focusContext, and the
::focused property will only be true for at most one object with the
same context.
2014-01-09 12:19:01 -07:00
Nathan Sobo
1a5e10c1d2 Focus the new pane when splitting 2014-01-09 12:19:01 -07:00
Nathan Sobo
8efcb1abfa Remove pane splitting/unsplitting logic from view
There's still some failing specs around focus management, but it's
getting closer.
2014-01-09 12:19:01 -07:00
Nathan Sobo
f031a9706d Support unsplitting in the model layer 2014-01-09 12:19:01 -07:00
Nathan Sobo
eb7f3ff5af Support splitting at the model layer
Splitting in the view will need to be removed and mapped to splits in
the model.
2014-01-09 12:19:00 -07:00
Nathan Sobo
bb595ab08a Start adding PaneAxisModel 2014-01-09 12:19:00 -07:00
Kevin Sawicki
371e31c786 🐎 Test for prefix without calling path.join
Directory::relativize is called many times by the fuzzy finder
and using path.join possibly multiple times per call was consuming
much of the time take to show the fuzzy finder view.
2014-01-08 17:55:08 -08:00
Kevin Sawicki
d95aa0aac1 Expand buffer range in Selection::selectLine 2014-01-08 16:27:09 -08:00
Kevin Sawicki
0fd8b6be8d Pluralize selection in event name 2014-01-08 15:45:09 -08:00
Kevin Sawicki
c8f3e056e9 Pluralize selections in method name 2014-01-08 15:17:06 -08:00
Kevin Sawicki
32fdf0b681 📝 Drop line about single line selections 2014-01-08 15:17:06 -08:00
Kevin Sawicki
82c73c9911 📝 Tweak comment for clarity 2014-01-08 15:17:06 -08:00
Kevin Sawicki
0ef6757e65 Add Editor::splitSelectionIntoLines 2014-01-08 15:17:06 -08:00
probablycorey
d908c8b026 Use absolute divs to limit repaints on keypresses 2014-01-08 14:31:46 -08:00
probablycorey
6f766acac8 Rename .row and .column to .pane-row and .pane-column
Bootstrap's .row and .column css was influencing our pane rows and
columns.
2014-01-08 14:30:33 -08:00
probablycorey
7eba9d3a23 Use flexbox to arrange panes 2014-01-08 14:29:32 -08:00
probablycorey
0471619269 Merge remote-tracking branch 'origin/master' into cj-ns-pane-models 2014-01-08 11:44:31 -08:00
Corey Johnson
c089429c14 Merge pull request #1367 from atom/cj-error-event
Add error event to atom global
2014-01-08 11:17:04 -08:00
Kevin Sawicki
cf47ee5063 Only call _.isEqual when needed
Invert the logic to return if all are equal so we can fall through
on the first false call so only the minimum isEqual calls are made.

Also perform the boolean check first instead of last since it
cheaper than a Point comparison.

This showed up in the profile when profiling moving the cursor.
2014-01-08 10:59:39 -08:00
Kevin Sawicki
9d6a01d11c Use slice to clone array 2014-01-08 10:59:39 -08:00
Nathan Sobo
c281eb9596 Move serialization of focus into PaneModel 2014-01-08 11:23:06 -07:00
Nathan Sobo
2acde6a727 Call super in constructor to assign PaneModel properties
The theorist model superclass constructor will automatically assign
all declared properties, or substitute the specified default value if
no param key is present for that property.
2014-01-08 11:21:00 -07:00
Nathan Sobo
ee9b78afb6 Move copyActiveItem to PaneModel 2014-01-08 11:14:02 -07:00
Nathan Sobo
a379d47230 Move methods related to item destruction and saving to PaneModel 2014-01-08 11:12:27 -07:00
Nathan Sobo
57c23e1b5f Merge remote-tracking branch 'origin/master' into ns-text-buffer-cleanup 2014-01-08 10:53:19 -07:00
Nathan Sobo
f8d959ae16 Upgrade to text-buffer 0.12.0
* Drop deprecation of insert/append/delete. The method names will remain
  short.

* Replace ::getLastPosition with ::getEndPosition
2014-01-08 10:53:07 -07:00