Skip to content

Commit

Permalink
fix record stop command being recorded #719
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Dec 27, 2021
1 parent 509f280 commit 65b50e5
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -11,6 +11,7 @@
* fix prompt that return string or promise (in animation and set_prompt) [#724](https://github.com/jcubic/jquery.terminal/issues/724)
* fix formatting in typing animation [#721](https://github.com/jcubic/jquery.terminal/issues/721)
* fix formatting colors and `--glow` [#725](https://github.com/jcubic/jquery.terminal/issues/725)
* fix record stop command being recorded [#719](https://github.com/jcubic/jquery.terminal/issues/719)

## 2.30.2
### Bugfix
Expand Down
11 changes: 7 additions & 4 deletions js/jquery.terminal-2.30.2.js
Expand Up @@ -41,7 +41,7 @@
*
* broken image by Sophia Bai from the Noun Project (CC-BY)
*
* Date: Sun, 26 Dec 2021 22:26:30 +0000
* Date: Mon, 27 Dec 2021 10:23:20 +0000
*/
/* global define, Map */
/* eslint-disable */
Expand Down Expand Up @@ -5130,7 +5130,7 @@
// -------------------------------------------------------------------------
$.terminal = {
version: 'DEV',
date: 'Sun, 26 Dec 2021 22:26:30 +0000',
date: 'Mon, 27 Dec 2021 10:23:20 +0000',
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down Expand Up @@ -8242,7 +8242,7 @@
}
}
// -----------------------------------------------------------------
function before_exec() {
function before_async_exec() {
// variables defined later in commands
if (!exec) {
change_hash = true;
Expand Down Expand Up @@ -8273,6 +8273,7 @@
function invoke() {
// Call user interpreter function
var result = interpreter.interpreter.call(self, command, self);
before_async_exec();
if (result) {
// auto pause/resume when user return promises
// it should not pause when user return promise from read()
Expand Down Expand Up @@ -8330,7 +8331,6 @@
command_line.history().append(command);
}
}
before_exec();
var interpreter = interpreters.top();
if (!silent && settings.echoCommand) {
echo_command(command);
Expand All @@ -8343,6 +8343,7 @@
// after delay
var saved_change_hash = change_hash;
if (command.match(/^\s*login\s*$/) && self.token(true)) {
before_async_exec();
if (self.level() > 1) {
self.logout(true);
} else {
Expand All @@ -8351,6 +8352,7 @@
after_exec();
} else if (settings.exit && command.match(/^\s*exit\s*$/) &&
!in_login) {
before_async_exec();
var level = self.level();
if (level === 1 && self.get_token() || level > 1) {
if (self.get_token(true)) {
Expand All @@ -8361,6 +8363,7 @@
after_exec();
} else if (settings.clear && command.match(/^\s*clear\s*$/) &&
!in_login) {
before_async_exec();
self.clear();
after_exec();
} else {
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.terminal-2.30.2.min.js

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions js/jquery.terminal-src.js
Expand Up @@ -8242,7 +8242,7 @@
}
}
// -----------------------------------------------------------------
function before_exec() {
function before_async_exec() {
// variables defined later in commands
if (!exec) {
change_hash = true;
Expand Down Expand Up @@ -8273,6 +8273,7 @@
function invoke() {
// Call user interpreter function
var result = interpreter.interpreter.call(self, command, self);
before_async_exec();
if (result) {
// auto pause/resume when user return promises
// it should not pause when user return promise from read()
Expand Down Expand Up @@ -8330,7 +8331,6 @@
command_line.history().append(command);
}
}
before_exec();
var interpreter = interpreters.top();
if (!silent && settings.echoCommand) {
echo_command(command);
Expand All @@ -8343,6 +8343,7 @@
// after delay
var saved_change_hash = change_hash;
if (command.match(/^\s*login\s*$/) && self.token(true)) {
before_async_exec();
if (self.level() > 1) {
self.logout(true);
} else {
Expand All @@ -8351,6 +8352,7 @@
after_exec();
} else if (settings.exit && command.match(/^\s*exit\s*$/) &&
!in_login) {
before_async_exec();
var level = self.level();
if (level === 1 && self.get_token() || level > 1) {
if (self.get_token(true)) {
Expand All @@ -8361,6 +8363,7 @@
after_exec();
} else if (settings.clear && command.match(/^\s*clear\s*$/) &&
!in_login) {
before_async_exec();
self.clear();
after_exec();
} else {
Expand Down
11 changes: 7 additions & 4 deletions js/jquery.terminal.js
Expand Up @@ -41,7 +41,7 @@
*
* broken image by Sophia Bai from the Noun Project (CC-BY)
*
* Date: Sun, 26 Dec 2021 22:26:30 +0000
* Date: Mon, 27 Dec 2021 10:23:20 +0000
*/
/* global define, Map */
/* eslint-disable */
Expand Down Expand Up @@ -5130,7 +5130,7 @@
// -------------------------------------------------------------------------
$.terminal = {
version: 'DEV',
date: 'Sun, 26 Dec 2021 22:26:30 +0000',
date: 'Mon, 27 Dec 2021 10:23:20 +0000',
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down Expand Up @@ -8242,7 +8242,7 @@
}
}
// -----------------------------------------------------------------
function before_exec() {
function before_async_exec() {
// variables defined later in commands
if (!exec) {
change_hash = true;
Expand Down Expand Up @@ -8273,6 +8273,7 @@
function invoke() {
// Call user interpreter function
var result = interpreter.interpreter.call(self, command, self);
before_async_exec();
if (result) {
// auto pause/resume when user return promises
// it should not pause when user return promise from read()
Expand Down Expand Up @@ -8330,7 +8331,6 @@
command_line.history().append(command);
}
}
before_exec();
var interpreter = interpreters.top();
if (!silent && settings.echoCommand) {
echo_command(command);
Expand All @@ -8343,6 +8343,7 @@
// after delay
var saved_change_hash = change_hash;
if (command.match(/^\s*login\s*$/) && self.token(true)) {
before_async_exec();
if (self.level() > 1) {
self.logout(true);
} else {
Expand All @@ -8351,6 +8352,7 @@
after_exec();
} else if (settings.exit && command.match(/^\s*exit\s*$/) &&
!in_login) {
before_async_exec();
var level = self.level();
if (level === 1 && self.get_token() || level > 1) {
if (self.get_token(true)) {
Expand All @@ -8361,6 +8363,7 @@
after_exec();
} else if (settings.clear && command.match(/^\s*clear\s*$/) &&
!in_login) {
before_async_exec();
self.clear();
after_exec();
} else {
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.terminal.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/jquery.terminal.min.js.map

Large diffs are not rendered by default.

0 comments on commit 65b50e5

Please sign in to comment.