Skip to content

Conversation

@daxian-dbw
Copy link
Member

@daxian-dbw daxian-dbw commented Feb 7, 2023

PR Summary

Fix #3559

Fix the menu completion to better handle the backspace key.

Keep this a draft PR until after adding tests.

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 marked this pull request as ready for review February 17, 2023 17:47
@daxian-dbw daxian-dbw self-assigned this Feb 17, 2023
Comment on lines +998 to +1004
// else {
// We should not pop the stack yet. The updated user completion text contains characters
// that are not included in the selected item of the menu at the top of stack. This may
// happen when the user pressed a 'Tab' before this 'Backspace', which updated the user
// completion text to include the unambiguous common prefix of the available completion
// candidates. In this case, we should stay in the current menu.
// }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh thank you super helpful comment 😄

@daxian-dbw
Copy link
Member Author

@andschwa Thanks for the review!

@daxian-dbw daxian-dbw merged commit f1b2043 into PowerShell:master Feb 27, 2023
@daxian-dbw daxian-dbw deleted the crash branch February 27, 2023 19:01
@ghost
Copy link

ghost commented Mar 8, 2023

🎉 v2.3.0-beta0 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.

exception ArgumentOutOfRangeException with setup "Tab to MenuComplete" and "HistorySearchCursorMovesToEnd"

2 participants