mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Merge branch 'master' of github.com:github/atom
This commit is contained in:
@@ -106,13 +106,13 @@ class RootView extends View
|
||||
makeEditorActive: (editor) ->
|
||||
previousActiveEditor = @panes.find('.editor.active').view()
|
||||
previousActiveEditor?.removeClass('active').off('.root-view')
|
||||
editor
|
||||
.addClass('active')
|
||||
.on 'editor-path-change.root-view', =>
|
||||
@trigger 'active-editor-path-change', editor.buffer.path
|
||||
editor.addClass('active')
|
||||
|
||||
if not previousActiveEditor or editor.buffer.path != previousActiveEditor.buffer.path
|
||||
@trigger 'active-editor-path-change', editor.buffer.path
|
||||
if not editor.mini
|
||||
editor.on 'editor-path-change.root-view', =>
|
||||
@trigger 'active-editor-path-change', editor.buffer.path
|
||||
if not previousActiveEditor or editor.buffer.path != previousActiveEditor.buffer.path
|
||||
@trigger 'active-editor-path-change', editor.buffer.path
|
||||
|
||||
activeKeybindings: ->
|
||||
keymap.bindingsForElement(document.activeElement)
|
||||
|
||||
@@ -54,7 +54,7 @@ class Autocomplete extends View
|
||||
@cancel()
|
||||
|
||||
@miniEditor.buffer.on 'change', (e) =>
|
||||
@filterMatches() if @parent()[0]
|
||||
@filterMatches() if @hasParent()
|
||||
|
||||
@miniEditor.preempt 'move-up', =>
|
||||
@selectPreviousMatch()
|
||||
@@ -100,7 +100,8 @@ class Autocomplete extends View
|
||||
|
||||
attach: ->
|
||||
@confirmed = false
|
||||
@miniEditor.on 'focusout', => @cancel() unless @confirmed
|
||||
@miniEditor.on 'focusout', =>
|
||||
@cancel() unless @confirmed
|
||||
|
||||
@originalSelectedText = @editor.getSelectedText()
|
||||
@originalSelectionBufferRange = @editor.getSelection().getBufferRange()
|
||||
@@ -116,9 +117,10 @@ class Autocomplete extends View
|
||||
@miniEditor.focus()
|
||||
|
||||
detach: ->
|
||||
@miniEditor.off("focusout")
|
||||
super
|
||||
@editor.off(".autocomplete")
|
||||
@editor.focus()
|
||||
super
|
||||
@miniEditor.buffer.setText('')
|
||||
|
||||
setPosition: (originalCursorPosition) ->
|
||||
|
||||
Reference in New Issue
Block a user