'xtermjs fit addon causes line to overwrite previous line
The fit addon causes a line in xtermjs to overwrite previous lines. Specifically, when the user types, half a line is filled up, and then the characters begin appearing from the left hand side of the line and overwriting the previous characters written there.
const fitAddon = new FitAddon.FitAddon()
term.loadAddon(fitAddon)
fitAddon.fit()
Solution 1:[1]
This happens when the columns of xterm and columns of your serverside PTY are not equivalent. You can change the xterm columns and rows like this.
const term = new Terminal({
rows: x,
cols: y,
});
Where x and y are your PTY rows and columns.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Syscall |
