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

Fix a few issues with the menu completion #1946

Merged
merged 5 commits into from
Nov 13, 2020

Conversation

daxian-dbw
Copy link
Member

@daxian-dbw daxian-dbw commented Nov 12, 2020

PR Summary

This PR fixes 3 issues with the menu completion:

  1. Fix menu completion to work with the predictive list view (fix PSReadLine 2.2.0 ListView affects the rendering of MenuComplete #1935 -- regression introduced in 2.2.0-beta1)
  2. Fix menu completion to clear lines properly when the menu top changes on re-drawing (regression introduced in 2.2.0-beta1)
  3. Fix how RightArrow, LeftArrow, UpArrow, and DownArrow navigate in the menu view (enhancement)

[NOTE] It's easier to review by ignoring the whitespace changes: https://github.com/PowerShell/PSReadLine/pull/1946/files?w=1 Most line changes are the new tests.

Navigation in menu view

Before the change, the RightArrow and LeftArrow don't work correctly:
demo

After the change, RightArrow and LeftArrow work as expected and you can use either one of RightArrow, LeftArrow, UpArrow, and DownArrow to loop through the menu items.

demo

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 9f786b3 into PowerShell:master Nov 13, 2020
@daxian-dbw daxian-dbw deleted the menufix branch November 13, 2020 19:20
@daxian-dbw
Copy link
Member Author

@SteveL-MSFT Thanks for the review.

@ghost
Copy link

ghost commented Feb 23, 2021

🎉 v2.2.0-beta2 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.

PSReadLine 2.2.0 ListView affects the rendering of MenuComplete
2 participants