Skip to content

Commit

Permalink
fix typing animation #945 #946
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed May 13, 2024
1 parent c9ccfa8 commit 6c9f0b9
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 30 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,8 @@
## 2.41.3
### Bugfix
* fix typing animation on emtpy lines [#946](https://github.com/jcubic/jquery.terminal/issues/946)
* fix skip typing animation [#945](https://github.com/jcubic/jquery.terminal/issues/945)

## 2.41.2
### Bugfix
* fix commands in pipe operator with non string arguments
Expand Down
23 changes: 14 additions & 9 deletions js/jquery.terminal-2.41.2.js
Expand Up @@ -4,7 +4,7 @@
* __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
* / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
* \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
* \/ /____/ version 2.41.2
* \/ /____/ version DEV
*
* This file is part of jQuery Terminal. https://terminal.jcubic.pl
*
Expand Down Expand Up @@ -41,7 +41,7 @@
*
* broken image by Sophia Bai from the Noun Project (CC-BY)
*
* Date: Wed, 08 May 2024 16:59:34 +0000
* Date: Mon, 13 May 2024 10:03:02 +0000
*/
/* global define, Map, BigInt */
/* eslint-disable */
Expand Down Expand Up @@ -5311,8 +5311,8 @@
}
// -------------------------------------------------------------------------
$.terminal = {
version: '2.41.2',
date: 'Wed, 08 May 2024 16:59:34 +0000',
version: 'DEV',
date: 'Mon, 13 May 2024 10:03:02 +0000',
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down Expand Up @@ -9299,10 +9299,12 @@
command_line.prompt(new_prompt, {formatters: false});
stop = true;
}
if (optimized) {
stop = line === anim_lines.length;
} else {
stop = char_i === len;
if (!stop) {
if (optimized) {
stop = line === anim_lines.length;
} else {
stop = char_i === len;
}
}
if (stop) {
clearInterval(interval);
Expand All @@ -9317,7 +9319,10 @@
// clear old lines and make one full line
// so it can wrap when you resize
anim_lines.forEach(function(line) {
self.remove_line(line.index);
// ignore skipped lines
if (typeof line.index !== 'undefined') {
self.remove_line(line.index);
}
});
}
finish_typing_fn(message, prompt, options);
Expand Down
6 changes: 3 additions & 3 deletions js/jquery.terminal-2.41.2.min.js

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions js/jquery.terminal-src.js
Expand Up @@ -9299,10 +9299,12 @@
command_line.prompt(new_prompt, {formatters: false});
stop = true;
}
if (optimized) {
stop = line === anim_lines.length;
} else {
stop = char_i === len;
if (!stop) {
if (optimized) {
stop = line === anim_lines.length;
} else {
stop = char_i === len;
}
}
if (stop) {
clearInterval(interval);
Expand All @@ -9317,7 +9319,10 @@
// clear old lines and make one full line
// so it can wrap when you resize
anim_lines.forEach(function(line) {
self.remove_line(line.index);
// ignore skipped lines
if (typeof line.index !== 'undefined') {
self.remove_line(line.index);
}
});
}
finish_typing_fn(message, prompt, options);
Expand Down
23 changes: 14 additions & 9 deletions js/jquery.terminal.js
Expand Up @@ -4,7 +4,7 @@
* __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
* / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
* \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
* \/ /____/ version 2.41.2
* \/ /____/ version DEV
*
* This file is part of jQuery Terminal. https://terminal.jcubic.pl
*
Expand Down Expand Up @@ -41,7 +41,7 @@
*
* broken image by Sophia Bai from the Noun Project (CC-BY)
*
* Date: Wed, 08 May 2024 16:59:34 +0000
* Date: Mon, 13 May 2024 10:03:02 +0000
*/
/* global define, Map, BigInt */
/* eslint-disable */
Expand Down Expand Up @@ -5311,8 +5311,8 @@
}
// -------------------------------------------------------------------------
$.terminal = {
version: '2.41.2',
date: 'Wed, 08 May 2024 16:59:34 +0000',
version: 'DEV',
date: 'Mon, 13 May 2024 10:03:02 +0000',
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down Expand Up @@ -9299,10 +9299,12 @@
command_line.prompt(new_prompt, {formatters: false});
stop = true;
}
if (optimized) {
stop = line === anim_lines.length;
} else {
stop = char_i === len;
if (!stop) {
if (optimized) {
stop = line === anim_lines.length;
} else {
stop = char_i === len;
}
}
if (stop) {
clearInterval(interval);
Expand All @@ -9317,7 +9319,10 @@
// clear old lines and make one full line
// so it can wrap when you resize
anim_lines.forEach(function(line) {
self.remove_line(line.index);
// ignore skipped lines
if (typeof line.index !== 'undefined') {
self.remove_line(line.index);
}
});
}
finish_typing_fn(message, prompt, options);
Expand Down
6 changes: 3 additions & 3 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 6c9f0b9

Please sign in to comment.