mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-06 19:18:22 +01:00
fix performance issue where cmdinput was causing additional loading of screenlines
This commit is contained in:
parent
112d002c2a
commit
f442236679
@ -121,8 +121,11 @@ class CmdInput extends React.Component<{}, {}> {
|
|||||||
let focusVal = inputModel.physicalInputFocused.get();
|
let focusVal = inputModel.physicalInputFocused.get();
|
||||||
let inputMode: string = inputModel.inputMode.get();
|
let inputMode: string = inputModel.inputMode.get();
|
||||||
let textAreaInputKey = screen == null ? "null" : screen.screenId;
|
let textAreaInputKey = screen == null ? "null" : screen.screenId;
|
||||||
let win = GlobalModel.getScreenLinesById(screen.screenId) ?? GlobalModel.loadScreenLines(screen.screenId);
|
let win = GlobalModel.getScreenLinesById(screen.screenId);
|
||||||
let numRunningLines = win.getRunningCmdLines().length;
|
let numRunningLines = 0;
|
||||||
|
if (win != null) {
|
||||||
|
numRunningLines = mobx.computed(() => win.getRunningCmdLines().length).get();
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
ref={this.cmdInputRef}
|
ref={this.cmdInputRef}
|
||||||
|
Loading…
Reference in New Issue
Block a user