-
Notifications
You must be signed in to change notification settings - Fork 384
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
TokenDeletionStyle.Remove #220
Comments
Do you mean that you want all but the most recently completed token to use .Clear and have the most recently completed token get replace by the completion text for that token instead of being cleared? If you have not started typing anything new and hit the delete key immediately after completing a token and .Clear is set, this should happen on most platforms. I haven't figured out exactly which platforms work this way. |
No I mean a blanket clear rule, all tokens react the same way including the most recently completed token |
Ah, I see. So the underlying inconsistent behavior is something provided by the system library. I'm not sure where the behavior comes from, though I'd be happy to add a fix if it's not too much of a hack. I'd prefer not to add this to the library if it's likely to make it less stable. |
Yes I agree that the trade off would not be worth it if it were to affect the stability, allowing the user to modify the last created token by not clearing the whole thing (in the case of a spelling error) makes sense, but I've found the behaviour to be occasionally inconsistent and I think it makes sense to have a clear rule that affects everything the same way and define a combination rule differently. |
Could you tie into TokenSpanWatcher.onSpanChanged() or onSpanRemoved() to clean up the autocomplete text? I haven't tested it but something along the lines of this may work.
|
After some time fussing with this behavior, it seems pretty clear that there's not a good way to make any of the token deletion behaviors work reliably, and the system behavior is highly dependent on keyboard implementation and OS version, so I'm unfortunately removing any behavior around specifying how deletion behavior works and marking these kinds of issues as won't fix. |
It would be useful to be able to specify a deletion style that performs in the same way as
TokenCompleteTextView.TokenDeletionStyle.Clear
but also includes the most recently completed token which would normally follow partial completion rules.The text was updated successfully, but these errors were encountered: