mirror of
https://github.com/atom/atom.git
synced 2026-02-14 08:35:11 -05:00
Clear mini editor base select list cancelled()
Clearing the mini editor when closing is something all sub-classes were already doing so it makes sense to pull it up to the base class as the default cancelled() implementation that can still be overridden if needed.
This commit is contained in:
@@ -35,9 +35,6 @@ class GrammarView extends SelectList
|
||||
grammars.unshift(@autoDetect)
|
||||
@setArray(grammars)
|
||||
|
||||
cancelled: ->
|
||||
@miniEditor.setText('')
|
||||
|
||||
confirmed: (grammar) ->
|
||||
@cancel()
|
||||
if grammar is @autoDetect
|
||||
|
||||
@@ -130,6 +130,9 @@ class SelectList extends View
|
||||
restoreFocus: ->
|
||||
@previouslyFocusedElement?.focus()
|
||||
|
||||
cancelled: ->
|
||||
@miniEditor.setText('')
|
||||
|
||||
cancel: ->
|
||||
@list.empty()
|
||||
@cancelling = true
|
||||
|
||||
Reference in New Issue
Block a user