The Wayback Machine - https://web.archive.org/web/20221207194721/https://github.com/atom/autocomplete-plus/pull/634
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

Don't overwrite non-word characters that match replacement suffixes #634

Merged
merged 1 commit into from Dec 3, 2015

Conversation

maxbrunsfeld
Copy link
Contributor

@maxbrunsfeld maxbrunsfeld commented Dec 3, 2015

This avoids overwriting characters in editor.nonWordCharacters when they follow the cursor and match a suffix of the autocomplete text.

This mainly comes up when the replacement text is a function call ending with ). Currently, when a ) already follows the cursor, it gets overwritten by the autocomplete text, which is usually not what the user wants.

Refs #628

/cc @benogle @nmote

@benogle
Copy link
Contributor

benogle commented Dec 3, 2015

Good solution 👍

@nmote
Copy link
Contributor

nmote commented Dec 3, 2015

LGTM!

@maxbrunsfeld
Copy link
Contributor Author

maxbrunsfeld commented Dec 3, 2015

Ok, both the appveyor failures were an off-by-one pixel position error. I don't think they're related to this PR, so I'm going to 🚢 this.

maxbrunsfeld pushed a commit that referenced this pull request Dec 3, 2015
Don't overwrite non-word characters that match replacement suffixes
@maxbrunsfeld maxbrunsfeld merged commit b5648fd into master Dec 3, 2015
@maxbrunsfeld maxbrunsfeld deleted the mb-dont-eat-non-word-characters branch Dec 3, 2015
@maxbrunsfeld
Copy link
Contributor Author

maxbrunsfeld commented Dec 3, 2015

@nmote This will be in Atom v1.4.0 (and v1.4.0-beta0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants