Nathan Sobo
1cab51cefa
RootView can no longer be focused.
...
Allowing root view to be focused was stealing focus away from the
editor whenever a click event made it to the root view. This unnecessary
switching of focus was interfering with the ability to drag tabs.
But if RootView can't be focused, focus ends up being returned to the
document body when there are no focusable elements. This would be fine,
except for the fact that we frequently bind global events on root view,
and so they aren't triggered when events are triggered on the body. We
could just bind all global events on the body, but this would require
us to always attach elements to the DOM during specs, which is a serious
performance killer in specs.
The workaround is in the keymap. When the keymap handles a key event
that was triggered on the body, it triggers the corresponding semantic
event on the root view anyway, so from the event perspective, it's as
if the root view actually had focus. The only place this might fall
down is if someone wants to capture raw key events. But that's the
keymap's job anyway, and we maybe add a hook on the keymap if such a
need ever arises.
2013-02-08 17:33:37 -07:00
Justin Palmer
2d968c11a1
this should cause tabs to be draggable
2013-02-08 14:41:14 -07:00
Nathan Sobo
6be72bac54
Guard against undefined marker ranges
2013-02-06 20:45:50 -07:00
Justin Palmer
eb7f4514e4
Merge pull request #244 from github/ui-polish
...
Ui polish
2013-02-06 18:33:50 -08:00
Nathan Sobo
9c6b658fe5
Merge branch 'dev' into markers
2013-02-06 18:10:42 -07:00
Nathan Sobo
5b3755a170
Fix errors in benchmarks
...
One notable change is that if the editor has a display update pending,
we wait until it completes before moving on to the next benchmark.
2013-02-06 18:01:32 -07:00
Nathan Sobo
56c81ccf0f
Memoize head and tail screen positions in DisplayBufferMarker
2013-02-06 17:32:13 -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
Justin Palmer
5ad38c9bc6
bracket matcher animation was kind of annoying when typing between brackets
2013-02-06 15:14:00 -08:00
Justin Palmer
1f50ca8d16
cleanup statusbar styles
2013-02-06 15:12:22 -08:00
Justin Palmer
124b2c0c07
lets do just mini on the grammar overlay since it originates from the middle
2013-02-06 14:48:33 -08:00
Justin Palmer
3675407ca7
use from-bottom overlay for grammar view
2013-02-06 13:51:40 -08:00
Justin Palmer
cec0757f55
sublte animation on bracket match
2013-02-06 13:40:12 -08:00
Nathan Sobo
28c31dc2e1
Merge branch 'dev' into markers
2013-02-06 14:27:30 -07:00
Justin Palmer
ac2d5c136b
match more of the look of .com's markdown style
2013-02-06 09:32:07 -08:00
Justin Palmer
c62b75804e
consolidate markdown styles into the markdown package
2013-02-06 09:21:46 -08:00
Justin Palmer
c2c8621394
Merge pull request #238 from github/semantic-tabs
...
Update tab design
2013-02-06 09:05:09 -08:00
Kevin Sawicki
57484d0756
Remove unused requires
2013-02-05 18:01:31 -08:00
Kevin Sawicki
80b680f3b7
Only require task if project has path
2013-02-05 17:30:44 -08:00
Kevin Sawicki
816ca6b8c0
Remove Native class
...
This class was only be used for two shims to the
$native object.
2013-02-05 17:22:08 -08: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
Jon Rohan
024a4916fd
making the default bracket theme yellow border, incase non-atom theme is used
2013-02-05 16:25:29 -08:00
Kevin Sawicki & Nathan Sobo
79d54e5483
Use markers instead of anchor ranges in command panel operations
2013-02-05 17:24:41 -07:00
Kevin Sawicki & Nathan Sobo
eee6903541
Use markers instead of anchors to track which close-brackets to skip
2013-02-05 17:21:24 -07:00
Justin Palmer
04b09c6552
💀 tab package css and move to static dir
2013-02-05 16:12:07 -08:00
Justin Palmer
972e3c0766
use a list for tabs
2013-02-05 16:11:28 -08: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
aaf22a9433
Nuke commented code
2013-02-05 16:47:21 -07:00
Kevin Sawicki & Nathan Sobo
0d6d89b209
Fix cursor autoscrolling when position doesn't change
...
When assigning the cursor's position, if we decide we want to autoscroll,
we should do so even if the cursor's position doesn't change.
The previous approach relied on a comparison of the position being
assigned, but this is before it has been clipped. Now we rely on a
boolean return value from the marker position assignment methods, which
tells us if the position has changed. If not, we need to emit our own
event to force autoscrolling.
2013-02-05 16:37:54 -07:00
Kevin Sawicki & Nathan Sobo
0465940e05
Merge remote-tracking branch 'origin/dev' into markers
2013-02-05 16:12:35 -07:00
Kevin Sawicki
a144b054e3
Use line height instead of char height
2013-02-05 15:11:26 -08: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
3dab8e92ee
Convert snippets to use markers instead of anchor ranges
2013-02-05 15:54:41 -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
17825edf66
Use off() instead of unbind()
...
unbind() is so pre-jQuery 1.7
2013-02-05 13:13:01 -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
Kevin Sawicki
7ecafb1594
Don't include tag prefix and suffix
...
Just include the tag name in the symbols view
instead of the lengthy namespace prefix and signature
suffix.
Refs #134
2013-02-05 10:04:37 -08:00
Kevin Sawicki
1b2c7faed9
Bind ctrl-meta-f to toggle full screen
...
Refs #134
2013-02-05 09:36:38 -08:00
Kevin Sawicki
9011d62351
Use octicon for README files
2013-02-05 09:17:47 -08:00
Justin Palmer
dd7835faf4
merge dev, fix conflicts
2013-02-05 08:18:59 -08:00
Kevin Sawicki
651d305f76
Add package namespace to command registration
2013-02-04 20:56:25 -08:00
Kevin Sawicki
39e39afa1b
Bind ctrl-j to jump to matching bracket
2013-02-04 20:38:50 -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