Skip to content

Commit fb63248

Browse files
committed
fix wrapping in multi-line command
1 parent d6f4ed8 commit fb63248

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

js/jquery.terminal-src.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3689,6 +3689,7 @@
36893689
lines = lines.map(function(line) {
36903690
return line.replace(/^\uFFFF+/, '');
36913691
});
3692+
var last_line_raw = $.terminal.strip(lines[lines.length - 1]);
36923693
lines = lines.map(function(line) {
36933694
if (!$.terminal.have_formatting(line)) {
36943695
return '[[;;]' + $.terminal.escape_brackets(line) + ']';
@@ -3708,7 +3709,7 @@
37083709
tabs: settings.tabs
37093710
});
37103711
var last_line = $.terminal.format(encoded_last_line, options);
3711-
just_prompt_len = strlen(text(encoded_last_line));
3712+
just_prompt_len = strlen(text(last_line_raw));
37123713
prompt_len = just_prompt_len + prompt_offset;
37133714
return lines.slice(0, -1).map(function(line) {
37143715
line = $.terminal.encode(line, {

js/jquery.terminal.js

Lines changed: 4 additions & 3 deletions
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, 04 Jan 2026 14:36:18 +0000
44+
* Date: Sun, 04 Jan 2026 15:12:04 +0000
4545
*/
4646
/* global define, Map, BigInt */
4747
/* eslint-disable */
@@ -3689,6 +3689,7 @@
36893689
lines = lines.map(function(line) {
36903690
return line.replace(/^\uFFFF+/, '');
36913691
});
3692+
var last_line_raw = $.terminal.strip(lines[lines.length - 1]);
36923693
lines = lines.map(function(line) {
36933694
if (!$.terminal.have_formatting(line)) {
36943695
return '[[;;]' + $.terminal.escape_brackets(line) + ']';
@@ -3708,7 +3709,7 @@
37083709
tabs: settings.tabs
37093710
});
37103711
var last_line = $.terminal.format(encoded_last_line, options);
3711-
just_prompt_len = strlen(text(encoded_last_line));
3712+
just_prompt_len = strlen(text(last_line_raw));
37123713
prompt_len = just_prompt_len + prompt_offset;
37133714
return lines.slice(0, -1).map(function(line) {
37143715
line = $.terminal.encode(line, {
@@ -5495,7 +5496,7 @@
54955496
// -------------------------------------------------------------------------
54965497
$.terminal = {
54975498
version: 'DEV',
5498-
date: 'Sun, 04 Jan 2026 14:36:18 +0000',
5499+
date: 'Sun, 04 Jan 2026 15:12:04 +0000',
54995500
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
55005501
color_names: [
55015502
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',

js/jquery.terminal.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/jquery.terminal.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)