Skip to content

Commit

Permalink
fix calling when command don't change
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Apr 18, 2024
1 parent 53a43c7 commit e74ce2e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* fix init and resize of long prompt [#919](https://github.com/jcubic/jquery.terminal/issues/919)
* fix occasional selecting Accessibility label (about clipboard textarea) in CMD
* fix sync commands and dynamic prompt [#923](https://github.com/jcubic/jquery.terminal/issues/923) [#922](https://github.com/jcubic/jquery.terminal/issues/922)
* fix calling `onCommandChange` when command don't change

## 2.39.3
### Bugfix
Expand Down
3 changes: 2 additions & 1 deletion js/jquery.terminal-src.js
Original file line number Diff line number Diff line change
Expand Up @@ -3710,13 +3710,14 @@
},
set: function(string, stay, silent) {
if (string !== undefined) {
var command_changed = string !== command;
command = string;
if (!stay) {
self.position(bare_text(command).length);
}
redraw();
fix_textarea();
if (!silent) {
if (!silent && command_changed) {
fire_change_command();
}
}
Expand Down
7 changes: 4 additions & 3 deletions js/jquery.terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
*
* broken image by Sophia Bai from the Noun Project (CC-BY)
*
* Date: Sun, 14 Apr 2024 19:34:37 +0000
* Date: Thu, 18 Apr 2024 19:49:50 +0000
*/
/* global define, Map, BigInt */
/* eslint-disable */
Expand Down Expand Up @@ -3710,13 +3710,14 @@
},
set: function(string, stay, silent) {
if (string !== undefined) {
var command_changed = string !== command;
command = string;
if (!stay) {
self.position(bare_text(command).length);
}
redraw();
fix_textarea();
if (!silent) {
if (!silent && command_changed) {
fire_change_command();
}
}
Expand Down Expand Up @@ -5307,7 +5308,7 @@
// -------------------------------------------------------------------------
$.terminal = {
version: 'DEV',
date: 'Sun, 14 Apr 2024 19:34:37 +0000',
date: 'Thu, 18 Apr 2024 19:49:50 +0000',
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
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 e74ce2e

Please sign in to comment.