mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Use atom-shell's "shell.beep()" to replace "$native.beep()"
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
fsUtils = require 'fs-utils'
|
||||
PEG = require 'pegjs'
|
||||
shell = require 'shell'
|
||||
|
||||
module.exports =
|
||||
class CommandInterpreter
|
||||
@@ -19,4 +20,4 @@ class CommandInterpreter
|
||||
|
||||
address.execute(@project, activeEditSession).done ->
|
||||
currentSelectionRange = activeEditSession.getSelection().getBufferRange()
|
||||
$native.beep() if previousSelectionRange.isEqual(currentSelectionRange)
|
||||
shell.beep() if previousSelectionRange.isEqual(currentSelectionRange)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
RootView = require 'root-view'
|
||||
CommandPanelView = require 'command-panel/lib/command-panel-view'
|
||||
shell = require 'shell'
|
||||
_ = require 'underscore'
|
||||
|
||||
describe "CommandPanel", ->
|
||||
@@ -253,10 +254,10 @@ describe "CommandPanel", ->
|
||||
commandPanel.execute("/Array")
|
||||
runs ->
|
||||
expect(editSession.getSelectedBufferRange()).toEqual [[11,14], [11,19]]
|
||||
spyOn($native, 'beep')
|
||||
spyOn(shell, 'beep')
|
||||
rootView.trigger 'command-panel:repeat-relative-address'
|
||||
waitsFor ->
|
||||
$native.beep.callCount > 0
|
||||
shell.beep.callCount > 0
|
||||
runs ->
|
||||
expect(editSession.getSelectedBufferRange()).toEqual [[11,14], [11,19]]
|
||||
|
||||
@@ -280,10 +281,10 @@ describe "CommandPanel", ->
|
||||
commandPanel.execute("/Array")
|
||||
runs ->
|
||||
expect(editSession.getSelectedBufferRange()).toEqual [[11,14], [11,19]]
|
||||
spyOn($native, 'beep')
|
||||
spyOn(shell, 'beep')
|
||||
rootView.trigger 'command-panel:repeat-relative-address-in-reverse'
|
||||
waitsFor ->
|
||||
$native.beep.callCount > 0
|
||||
shell.beep.callCount > 0
|
||||
runs ->
|
||||
expect(editSession.getSelectedBufferRange()).toEqual [[11,14], [11,19]]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user