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

PromptInputModel: Update model when prompt changes without cursor movement #210706

Merged
merged 4 commits into from
Apr 19, 2024

Conversation

Tyriar
Copy link
Member

@Tyriar Tyriar commented Apr 18, 2024

Fixes #210740

Summary:

  • Update xterm.js to bring in onWriteParsed API for @xterm/headless
  • Trigger PromptInputModel._sync on xterm.onWriteParsed
  • Set cursorIndex to -1 after a command has executed and align assertions in tests
  • Throttle PromptInputModel._sync with a delay of 0 instead of debounce(50), this allows us to not force a sync in the tests and instead just await timeout(0). This is required to get the new test to fail before the fix

@Tyriar Tyriar added this to the April 2024 milestone Apr 18, 2024
@Tyriar Tyriar self-assigned this Apr 18, 2024
@Tyriar Tyriar changed the title Tyriar/update cursor still PromptInputModel: Update model when prompt changes without cursor movement Apr 19, 2024
@Tyriar Tyriar requested a review from meganrogge April 19, 2024 12:52
@Tyriar Tyriar marked this pull request as ready for review April 19, 2024 12:52
@Tyriar Tyriar enabled auto-merge April 19, 2024 14:19
@Tyriar Tyriar merged commit 34a283a into main Apr 19, 2024
6 checks passed
@Tyriar Tyriar deleted the tyriar/update_cursor_still branch April 19, 2024 14:45
sergioengineer pushed a commit to sergioengineer/VimSCode that referenced this pull request Apr 23, 2024
…or_still

PromptInputModel: Update model when prompt changes without cursor movement
@microsoft microsoft locked and limited conversation to collaborators Jun 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PromptInputModel: Dev mode status bar entry doesn't update when deleting word in front
2 participants