Merge pull request #2298 from ethereum/fix_compile_run

fix listenning ctrl key from compile and run
pull/5370/head
yann300 3 years ago committed by GitHub
commit 9b74a9bfe4
  1. 5
      apps/remix-ide/src/app/tabs/compile-and-run.ts

@ -26,8 +26,10 @@ export class CompileAndRun extends Plugin {
super(profile) super(profile)
this.executionListener = async (e) => { this.executionListener = async (e) => {
// ctrl+e or command+e // ctrl+e or command+e
if ((e.metaKey || e.ctrlKey) && e.shiftKey && e.keyCode === 83) {
const file = await this.call('fileManager', 'file') const file = await this.call('fileManager', 'file')
if ((e.metaKey || e.ctrlKey) && e.shiftKey && e.keyCode === 83 && file !== '') { if (file) {
if (file.endsWith('.sol')) { if (file.endsWith('.sol')) {
e.preventDefault() e.preventDefault()
this.targetFileName = file this.targetFileName = file
@ -41,6 +43,7 @@ export class CompileAndRun extends Plugin {
} }
} }
} }
}
runScriptAfterCompilation (fileName: string) { runScriptAfterCompilation (fileName: string) {
this.targetFileName = fileName this.targetFileName = fileName

Loading…
Cancel
Save