Skip to content

Commit c189b81

Browse files
committed
fix initalization of cmd plugin #919
1 parent 93e9a18 commit c189b81

4 files changed

+9
-9
lines changed

js/jquery.terminal-src.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4021,15 +4021,15 @@
40214021
// :: INIT
40224022
// ---------------------------------------------------------------------
40234023
self.name(settings.name || settings.prompt || '');
4024+
char_width = get_char_width();
4025+
num_chars = get_num_chars(char_width);
40244026
if (settings.prompt !== false) {
40254027
prompt = settings.prompt;
40264028
draw_prompt();
40274029
}
40284030
if (settings.enabled === true) {
40294031
self.enable();
40304032
}
4031-
char_width = get_char_width();
4032-
num_chars = get_num_chars(char_width);
40334033
if (!settings.history) {
40344034
history.disable();
40354035
}

js/jquery.terminal.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
*
4242
* broken image by Sophia Bai from the Noun Project (CC-BY)
4343
*
44-
* Date: Sun, 07 Apr 2024 16:50:23 +0000
44+
* Date: Sun, 07 Apr 2024 16:52:49 +0000
4545
*/
4646
/* global define, Map, BigInt */
4747
/* eslint-disable */
@@ -4021,15 +4021,15 @@
40214021
// :: INIT
40224022
// ---------------------------------------------------------------------
40234023
self.name(settings.name || settings.prompt || '');
4024+
char_width = get_char_width();
4025+
num_chars = get_num_chars(char_width);
40244026
if (settings.prompt !== false) {
40254027
prompt = settings.prompt;
40264028
draw_prompt();
40274029
}
40284030
if (settings.enabled === true) {
40294031
self.enable();
40304032
}
4031-
char_width = get_char_width();
4032-
num_chars = get_num_chars(char_width);
40334033
if (!settings.history) {
40344034
history.disable();
40354035
}
@@ -5305,7 +5305,7 @@
53055305
// -------------------------------------------------------------------------
53065306
$.terminal = {
53075307
version: 'DEV',
5308-
date: 'Sun, 07 Apr 2024 16:50:23 +0000',
5308+
date: 'Sun, 07 Apr 2024 16:52:49 +0000',
53095309
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
53105310
color_names: [
53115311
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',

js/jquery.terminal.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/jquery.terminal.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)