Skip to content

Comments

Fix doubled quotes when completing quoted words with multiple candidates (backport)#1645

Open
gnodet wants to merge 1 commit intojline-3.xfrom
backport/completion-quote-handling
Open

Fix doubled quotes when completing quoted words with multiple candidates (backport)#1645
gnodet wants to merge 1 commit intojline-3.xfrom
backport/completion-quote-handling

Conversation

@gnodet
Copy link
Member

@gnodet gnodet commented Feb 19, 2026

Summary

Backport of #1644. See that PR for details.

Fixes #1036

When the input starts with a quote character (e.g., typing "Ex then Tab),
the menu completion and auto-menu paths used word().length() or
current.length() to backspace the buffer, which excluded the opening quote.
The subsequent escape() call would then re-add the quote, resulting in a
doubled quote (e.g., ""Example1" instead of "Example1").

Fix both the MENU_COMPLETE path and the AUTO_MENU path to use
rawWordLength() which correctly includes the opening quote character.

Fixes #1036
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.

1 participant