xterm5.3.0 replaces the first character of a line when the input character is too long 当输入字符过长时候会他替换行首字符 #4892
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Cannot repro. 😐 |
Beta Was this translation helpful? Give feedback.
-
这个问题我解决了,是因为jsch开启Linux终端的时候有限制,导致前端在超过80字符的时候,Linux会给一个换行和空字符串。解决办法是在开启终端以后执行stty cols 240,或者channel进行设置 I solved this problem because jsch had a restriction when opening the Linux terminal, which caused the front-end to give a newline and an empty string when it exceeded 80 characters. The workaround is to run stty cols 240 after opening the terminal, or set the channel ((ChannelShell) channel).setPtyType("xterm"); |
Beta Was this translation helpful? Give feedback.
-
您好,我想问您一个问题,您在开发中是否遇到过,当输入命令过长(超过一行),对其进行删除的时候,光标的位置停留到了第二行的起始位置不会改变的问题?如果有的话,能帮忙解惑吗? |
Beta Was this translation helpful? Give feedback.
这个问题我解决了,是因为jsch开启Linux终端的时候有限制,导致前端在超过80字符的时候,Linux会给一个换行和空字符串。解决办法是在开启终端以后执行stty cols 240,或者channel进行设置
((ChannelShell) channel).setPtyType("xterm");
((ChannelShell) channel).setPtySize(5000, 5000, 640, 480); // 设置列数为 5000
I solved this problem because jsch had a restriction when opening the Linux terminal, which caused the front-end to give a newline and an empty string when it exceeded 80 characters. The workaround is to run stty cols 240 after opening the terminal, or set the channel ((ChannelShell) channel).setPtyType("xterm");
((ChannelShell) channel).setPtySize(5000, 5000, 640, 480); // Set the number of columns to 5000