mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Command panel can be detached after preview without throwing an exception
This commit is contained in:
@@ -138,6 +138,8 @@ describe "CommandPanel", ->
|
||||
expect(previewItem.preview.text()).toBe "aaa bbb"
|
||||
expect(previewItem.preview.find(".match").text()).toBe "aaa"
|
||||
|
||||
rootView.trigger 'command-panel:toggle'
|
||||
|
||||
describe "if the command is malformed", ->
|
||||
it "adds and removes an error class to the command panel and does not close it", ->
|
||||
rootView.trigger 'command-panel:toggle'
|
||||
|
||||
@@ -68,6 +68,7 @@ class CommandPanel extends View
|
||||
@rootView.focus()
|
||||
if @previewedOperations
|
||||
operation.destroy() for operation in @previewedOperations
|
||||
@previewedOperations = undefined
|
||||
super
|
||||
|
||||
execute: (command = @miniEditor.getText()) ->
|
||||
|
||||
Reference in New Issue
Block a user