Skip to content

go-prompt: fix update completion data #14

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

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

dmyger
Copy link

@dmyger dmyger commented Sep 25, 2024

The issue that in GetSelectedSuggestion() there is no checks that index in valid range. So here we are resetting selected index, if length of new array is less, than it was.

Part of tarantool/tt#944

@dmyger dmyger force-pushed the dmyger/gh-944-fix-update-competion-data branch from 3c05b6b to cc02710 Compare September 25, 2024 13:01
Copy link

@oleg-jukovec oleg-jukovec left a comment

Choose a reason for hiding this comment

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

Let's wait for a user feedback since we don't have a reproducer.

Closes #944 -> Part of https://github.com/tarantool/tt/issues/944

@dmyger dmyger force-pushed the dmyger/gh-944-fix-update-competion-data branch from c7ebd98 to 3bbf8fd Compare September 25, 2024 14:04
Copy link

@oleg-jukovec oleg-jukovec left a comment

Choose a reason for hiding this comment

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

Please, update the commit message: each line should be 72 chars max.

Copy link

@oleg-jukovec oleg-jukovec left a comment

Choose a reason for hiding this comment

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

Please, apply suggested changes.

The issue that in `GetSelectedSuggestion()` there is no checks
that index in valid range. So here we are resetting `selected` index,
if length of new array is less, than it was.

Part of tarantool/tt#944
@dmyger dmyger force-pushed the dmyger/gh-944-fix-update-competion-data branch from 3bbf8fd to a8e4996 Compare October 8, 2024 11:39
Copy link

@oleg-jukovec oleg-jukovec left a comment

Choose a reason for hiding this comment

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

Please, check that tarantool/tt#944 (comment) works fine.

@oleg-jukovec oleg-jukovec merged commit 61aaf11 into main Oct 8, 2024
4 checks passed
@oleg-jukovec oleg-jukovec deleted the dmyger/gh-944-fix-update-competion-data branch October 8, 2024 17:28
oleg-jukovec added a commit that referenced this pull request Oct 8, 2024
Fixed

* Crash after a completion update with a smaller suggestion (#14).
@oleg-jukovec oleg-jukovec mentioned this pull request Oct 8, 2024
oleg-jukovec added a commit that referenced this pull request Oct 9, 2024
Fixed

* Crash after a completion update with a smaller suggestion (#14).
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.

3 participants