mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
get input working, fix currentrowheight constant
This commit is contained in:
+1
-1
@@ -179,7 +179,7 @@ class LineCmd extends React.Component<{sw : ScreenWindow, line : LineType}, {}>
|
||||
return <div className="line line-invalid">[cmd not found '{line.cmdid}']</div>;
|
||||
}
|
||||
let termLoaded = this.termLoaded.get();
|
||||
let cellHeightPx = 17;
|
||||
let cellHeightPx = 16;
|
||||
let usedRows = cmd.getUsedRows(sw.screenId, sw.windowId);
|
||||
let totalHeight = cellHeightPx * usedRows;
|
||||
let remote = model.getRemote(cmd.remoteId);
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ class Cmd {
|
||||
console.log("term-wrap already exists for", screenId, windowId);
|
||||
return;
|
||||
}
|
||||
termWrap = new TermWrap(elem, this.sessionId, this.cmdId, 0, this.getTermOpts(), this.handleKey);
|
||||
termWrap = new TermWrap(elem, this.sessionId, this.cmdId, 0, this.getTermOpts(), this.handleKey.bind(this));
|
||||
this.instances[screenId + "/" + windowId] = termWrap;
|
||||
return;
|
||||
}
|
||||
|
||||
+5
-1
@@ -52,7 +52,7 @@ class TermWrap {
|
||||
this.atRowMax = true;
|
||||
this.usedRows = mobx.observable.box(termOpts.rows);
|
||||
}
|
||||
this.terminal = new Terminal({rows: termOpts.rows, cols: termOpts.cols, theme: {foreground: "#d3d7cf"}});
|
||||
this.terminal = new Terminal({rows: termOpts.rows, cols: termOpts.cols, fontSize: 14, theme: {foreground: "#d3d7cf"}});
|
||||
this.terminal.open(elem);
|
||||
if (keyHandler != null) {
|
||||
this.terminal.onKey(keyHandler);
|
||||
@@ -66,6 +66,10 @@ class TermWrap {
|
||||
this.reloadTerminal(0);
|
||||
}
|
||||
|
||||
getFontHeight() : number {
|
||||
return this.terminal._core.viewport._currentRowHeight;
|
||||
}
|
||||
|
||||
dispose() {
|
||||
if (this.terminal != null) {
|
||||
this.terminal.dispose();
|
||||
|
||||
Reference in New Issue
Block a user