Code duplication cleanup after last commit

This commit is contained in:
2026-02-06 17:34:22 +01:00
parent ef09b642d6
commit f678c0fa54
2 changed files with 0 additions and 18 deletions

View File

@@ -87,14 +87,6 @@ export class Terminal {
return result;
}
getTerminalWidth(): number {
const width = this.callbacks.getWidth?.();
if(!width) { throw new Error('somehow width is undefined still after all the checks'); }
console.log(width);
return width;
}
executeCommand(input: string): void {
this.bash.updateHistory(input);
const parsed: ParsedInput = this._parseInput(input);

View File

@@ -10,16 +10,6 @@
const printOutput = (e: HTMLElement, d: PrintData): void => print(e, d);
function getWidth() {
const e = document.getElementById('cout');
if(!e){
throw new Error('cant get width of the teminal element. Its null');
}
const padding: number = parseInt(window.getComputedStyle(e, null).getPropertyValue('padding').slice(0, -2));
console.log(padding);
return e.clientWidth - (padding * 2);
}
function updateTerminal() {
username = terminal!.getUser().username;
cwd = terminal!.getCwd();