xtermjs / xterm.js

A terminal for the web
https://xtermjs.org/
MIT License
17.44k stars 1.62k forks source link

xterm5.3.0 replaces the first character of a line when the input character is too long 当输入字符过长时候会他替换行首字符 #4890

Closed yanceysong closed 10 months ago

yanceysong commented 10 months ago

我在使用Xterm5.3.0库的时候发现,当我终端输入的长度大于某一个值的时候,新输入的字符并不会随着我设置的cols起效,而是会替换行首的字符。麻烦问一下各位如何解决? When I was using the Xterm5.3.0 library, I found that when the length of my terminal input was greater than a certain value, the newly entered character did not take effect with the cols I set, but replaced the character at the beginning of the line. Could you tell me how to solve it?

下面是我的演示gif Here is my demo gif 2

下面是我的实例化代码 Here is my instantiation code


const term = new Terminal({
            cols: 240,
            rows: 100,
            cursorBlink: true,
            convertEol: false, 
            cursorStyle: "block",
            scrollback: 1, 
            tabStopWidth: 8, 
            wraparoundMode: true,
            theme: {
                foreground: '#5eb66b',
                background: '#030c26', 
                cursor: 'help',
            },
            rightClickSelectsWord: true,
            fontSize: 18,
            screenKeys: true
        });