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

Update the inline suggestion rendering to not exceed the max window buffer #2892

Merged
merged 3 commits into from
Sep 23, 2021

Conversation

daxian-dbw
Copy link
Member

@daxian-dbw daxian-dbw commented Sep 23, 2021

PR Summary

Fix #1944

Update the inline suggestion rendering to not exceed the max window buffer.
When the suggestion text is too long and cannot fit in the console buffer, we truncate the end part and use ellipsis instead.
The purpose is to make sure the user input text doesn't get scrolled up-off the console buffer, because that would make the editing difficult. Example:

image

PR Checklist

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Make sure you've added one or more new tests
  • Make sure you've tested these changes in terminals that PowerShell is commonly used in (i.e. conhost.exe, Windows Terminal, Visual Studio Code Integrated Terminal, etc.)
  • User-facing changes
    • Not Applicable
    • OR
    • Documentation needed at PowerShell-Docs
      • Doc Issue filed:
Microsoft Reviewers: Open in CodeFlow

@daxian-dbw daxian-dbw merged commit 0ae04cd into PowerShell:master Sep 23, 2021
@daxian-dbw daxian-dbw deleted the vi-pred branch September 23, 2021 21:17
@ghost
Copy link

ghost commented Oct 28, 2021

🎉 v2.2.0-beta4 has been released which incorporates this pull request. 🎉

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 this pull request may close these issues.

when I type d,something went wrong.
1 participant