diff --git a/src/lib/stores/terminal/terminal.ts b/src/lib/stores/terminal/terminal.ts index ef54340..e569d18 100755 --- a/src/lib/stores/terminal/terminal.ts +++ b/src/lib/stores/terminal/terminal.ts @@ -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); diff --git a/src/modules/Terminal.svelte b/src/modules/Terminal.svelte index 5d178db..dda3766 100755 --- a/src/modules/Terminal.svelte +++ b/src/modules/Terminal.svelte @@ -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();