Skip to content

Commit

Permalink
2.0.2 ptyshell解析问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaobaidadada committed Jan 16, 2025
1 parent 71ca28e commit 0271e78
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main/domain/shell/PtyShell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,8 @@ export class PtyShell {
line_reduce_num?: number,
p_line?: string
}) {
const not_have_child = !this.child;
const prompt = not_have_child ? this.raw_prompt : this.child_now_line;
let len = not_have_child ?this.prompt_call_len:PtyShell.get_full_char_num(this.child_now_line) + this.line_char_index; // 字符串前面的字符数量
const prompt = !this.child ? this.raw_prompt : this.child_now_line;
let len = (!this.child?this.prompt_call_len:PtyShell.get_full_char_num(prompt)) + this.line_char_index; // 字符串前面的字符数量
if (param && param.line_add_num) {
len += param.line_add_num;
} else if (param && param.line_reduce_num) {
Expand Down Expand Up @@ -725,7 +724,7 @@ export class PtyShell {
break;
default:
// 未知的不报错也不执行
return;
return;
}
}
if (this.cmd_set.has(exe)) {
Expand Down

0 comments on commit 0271e78

Please sign in to comment.