Skip to content

fix autosuggestion bug - #987

Open
elseawhy wants to merge 1 commit into
HalFrgrd:masterfrom
elseawhy:fix-completion-flash
Open

fix autosuggestion bug#987
elseawhy wants to merge 1 commit into
HalFrgrd:masterfrom
elseawhy:fix-completion-flash

Conversation

@elseawhy

@elseawhy elseawhy commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

This pr fixes #986

Previously splitting a word by inserting a space would cause overlaps_with to return true since the split suffix technically overlapped the original byte range, which incorrectly triggers a restart. In Restart, auto-started is hardcoded to true, this causes the auto suggestion menu to flash briefly if a restart is triggered when auto suggestion is disabled. The better and more correct way would be comparing the old and new state directly via new_wuc.start == current_wuc.start

To address the hardcoded auto-suggest = true during restart, i added this

                    let was_auto_started = previous_suggestions
                        .as_ref()
                        .map(|previous_active| previous_active.auto_started)
                        .unwrap_or(true);

to extract the previous state ( whether it was auto started or not ), instead of hardcoding it to be true :)

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.

[BUG]: Autosuggestion's menu shows up despite being disabled

1 participant