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

reset() not finished on sync return #4603

Closed
jerch opened this issue Jul 21, 2023 · 4 comments · Fixed by #4638
Closed

reset() not finished on sync return #4603

jerch opened this issue Jul 21, 2023 · 4 comments · Fixed by #4638
Assignees
Labels
area/api type/bug Something is misbehaving
Milestone

Comments

@jerch
Copy link
Member

jerch commented Jul 21, 2023

coming from #4319 (reply in thread) - the Terminal.reset call does not finish the re-initialization synchronous.

possible fixes:
Either make it a promise (rather a quickfix and with ugly API change), or revisit the code paths, that are not ready yet when returning synchronously from the method and execute them in sync.

@jerch jerch added type/bug Something is misbehaving area/api labels Jul 21, 2023
@Tyriar
Copy link
Member

Tyriar commented Jul 27, 2023

This is surprising, it was always meant to be sync so hopefully we can fix it.

@Tyriar
Copy link
Member

Tyriar commented Jul 27, 2023

clear too? 😕 #4319 (reply in thread)

This isn't just a re-rendering problem is it?

@jerch
Copy link
Member Author

jerch commented Jul 27, 2023

This isn't just a re-rendering problem is it?

Haven't looked into it yet, I'd say yes - its a re-rendering issue with false scrollOffset from viewport.ts (prolly due to using an animation frame there, its just a guess though atm).

clear too?

Yeah, seems so.

@Tyriar Tyriar self-assigned this Jul 28, 2023
@Tyriar Tyriar added this to the 5.3.0 milestone Jul 28, 2023
@Tyriar
Copy link
Member

Tyriar commented Aug 2, 2023

Repro: run this in console term.reset(); term.write('1\n2\n3\n\r'.repeat(20));

Tyriar added a commit to Tyriar/xterm.js that referenced this issue Aug 2, 2023
Tyriar added a commit to Tyriar/xterm.js that referenced this issue Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api type/bug Something is misbehaving
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants