Skip to content

Commit

Permalink
perf: 优化分屏连接第一个会重复执行命令问题
Browse files Browse the repository at this point in the history
  • Loading branch information
huailei000 committed Dec 28, 2023
1 parent f3b5648 commit 03e86de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/elements/content/content.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ export class ElementContentComponent implements OnInit, OnDestroy {
if (list[i].protocol !== 'ssh' || list[i].connected !== true) {
continue;
}
list[i].termComp.sendCommand({'data': cmd});
const subViews = list[i].subViews;
if (subViews.length > 1) {
for (let j = 0; j < subViews.length; j++) {
Expand All @@ -188,6 +187,8 @@ export class ElementContentComponent implements OnInit, OnDestroy {
}
subViews[j].termComp.sendCommand({'data': cmd});
}
} else {
list[i].termComp.sendCommand({'data': cmd});
}
}

Expand Down

0 comments on commit 03e86de

Please sign in to comment.