Loading static/js/exercises.api.mjs +11 −1 Original line number Diff line number Diff line Loading @@ -193,10 +193,20 @@ class ExerciseExecutionContext { function tryPrepareAndResolve() { if(getTerminalContents().length === 0 && !isVmLoading()) { // We don't have a prompt, and the VM doesn't appear to be loading. // So maybe the user has opened an editor or a pager. Let's try to get out of this. // So maybe the user has opened a pager. Let's try to get out of this, using Ctrl+C. abort() } if(getTerminalContents().length === 0 && !isVmLoading()) { // If there is still no prompt, and just like before, the VM isn't loading, // Ctrl+C apparently didn't work to exit whatever we were in. // So we are probably in Vi. // Try exiting that. runCommand(":q!") } if (getTerminalContents().length > 0) { // We have a prompt, so we can prepare and resolve. clearInterval(intervalId) Loading Loading
static/js/exercises.api.mjs +11 −1 Original line number Diff line number Diff line Loading @@ -193,10 +193,20 @@ class ExerciseExecutionContext { function tryPrepareAndResolve() { if(getTerminalContents().length === 0 && !isVmLoading()) { // We don't have a prompt, and the VM doesn't appear to be loading. // So maybe the user has opened an editor or a pager. Let's try to get out of this. // So maybe the user has opened a pager. Let's try to get out of this, using Ctrl+C. abort() } if(getTerminalContents().length === 0 && !isVmLoading()) { // If there is still no prompt, and just like before, the VM isn't loading, // Ctrl+C apparently didn't work to exit whatever we were in. // So we are probably in Vi. // Try exiting that. runCommand(":q!") } if (getTerminalContents().length > 0) { // We have a prompt, so we can prepare and resolve. clearInterval(intervalId) Loading