mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Merge branch 'master' into config
This commit is contained in:
@@ -63,3 +63,7 @@ class Git
|
||||
|
||||
checkoutHead: (path) ->
|
||||
@repo.checkoutHead(@relativize(path))
|
||||
|
||||
getDiffStats: (path) ->
|
||||
stats = @repo.getDiffStats(@relativize(path))
|
||||
stats or {'added': 0, 'deleted': 0}
|
||||
|
||||
@@ -52,20 +52,24 @@ class RootView extends View
|
||||
panesViewState: @panes.children().view()?.serialize()
|
||||
packageStates: @serializePackages()
|
||||
|
||||
handleEvents: ->
|
||||
@on 'toggle-dev-tools', => atom.toggleDevTools()
|
||||
@on 'focus', (e) =>
|
||||
if @getActiveEditor()
|
||||
@getActiveEditor().focus()
|
||||
handleFocus: (e) ->
|
||||
if @getActiveEditor()
|
||||
@getActiveEditor().focus()
|
||||
false
|
||||
else
|
||||
@setTitle(null)
|
||||
focusableChild = this.find("[tabindex=-1]:visible:first")
|
||||
if focusableChild.length
|
||||
focusableChild.focus()
|
||||
false
|
||||
else
|
||||
@setTitle(null)
|
||||
focusableChild = this.find("[tabindex=-1]:visible:first")
|
||||
if focusableChild.length
|
||||
focusableChild.focus()
|
||||
false
|
||||
else
|
||||
true
|
||||
true
|
||||
|
||||
handleEvents: ->
|
||||
@on 'toggle-dev-tools', => atom.toggleDevTools()
|
||||
@on 'focus', (e) => @handleFocus(e)
|
||||
$(window).on 'focus', (e) =>
|
||||
@handleFocus(e) if document.activeElement is document.body
|
||||
|
||||
@on 'active-editor-path-change', (e, path) =>
|
||||
@project.setPath(path) unless @project.getRootDirectory()
|
||||
|
||||
Reference in New Issue
Block a user