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 panic in long item completion in ide menu #823

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

HKalbasi
Copy link
Contributor

@HKalbasi HKalbasi commented Sep 4, 2024

Ide menu uses ... for items that are very long, and if the prompt already contains some string inside of ... it will panic. It can be reproduced by completing the largest item in the ide_completions, then deleting one or two characters, and hitting Tab again.

The panic was found in #821

@fdncred
Copy link
Collaborator

fdncred commented Sep 6, 2024

This is how I was able to repro the bug and test this fix.

  1. cargo run --example ide_completions
  2. h<tab>
  3. the longest entry should now be selected with ... at the end
  4. hit enter
  5. hit backspace
  6. hit tab

Thanks for fixing this. Let's go!

@fdncred fdncred merged commit 7af8959 into nushell:main Sep 6, 2024
6 checks passed
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.

2 participants