Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xterm 渲染不全 #4992

Closed
enjoy-myLife opened this issue Mar 7, 2024 · 3 comments · Fixed by #4993
Closed

xterm 渲染不全 #4992

enjoy-myLife opened this issue Mar 7, 2024 · 3 comments · Fixed by #4993

Comments

@enjoy-myLife
Copy link

enjoy-myLife commented Mar 7, 2024

Details

  • Browser and browser version: Chrome 120.0.6099.225
  • OS version:
  • xterm.js version: 5.3.0

Steps to reproduce

  1. 附件文本
  2. rows为很小的数字比如5

const initTerm = () => {
term.value = new Terminal({
cols:102,
rows:5,
fontSize: 14,
fontFamily: "Monaco, Menlo, Consolas, 'Courier New', monospace",
});
term.value.open(terminal.value); //挂载dom窗口
// term.value.loadAddon(fitAddon); //自适应尺寸
// 不能初始化的时候fit,需要等terminal准备就绪,可以设置延时操作

term.value.onRender(() => {
	// fitAddon.fit();
});
termData(); //Terminal 事件挂载

};

// 终端输入触发事件
const termData = () => {
// 输入与粘贴的情况,onData不能重复绑定,不然会发送多次
term.value.onData((data: string) => {
emits('onData', data);
});
};

onMounted(() => {
initTerm();
setTimeout(()=>{
term.value.write(附件文本)
},5000)
});

xterm不能将文本渲染完全,在开发者工具里面甚至很多文本没有渲染

@enjoy-myLife
Copy link
Author

image

这已经是滚动到最顶部了

@enjoy-myLife
Copy link
Author

oh my god!!!
After reading the source code of xterm, I learned that the default scrollback is 1000;
#518
I hope the author will mark it on the document or in the comments of the ts file. It is too difficult to find.

Tyriar added a commit to Tyriar/xterm.js that referenced this issue Mar 7, 2024
@Tyriar
Copy link
Member

Tyriar commented Mar 7, 2024

Adding in #4993 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants