Page MenuHome

Fix T93519: Handle prefix names in autocompletes
ClosedPublic

Authored by Azeem Bande-Ali (azeemba) on Dec 6 2021, 12:45 AM.

Details

Summary

Autocomplete entries keep track of the length of the prefix
in name_prefix_offset. However, the name matching logic
was comparing the string including the prefix which resulted
in tab-completion not working.

This is fixed by passing in a char pointer after the end of
the prefix.

We additionally move some searchbox logic. Previously,
ui_searchbox_apply would clear the entry which would mean
that ui_searchbox_find_index would never succeed. We
move the "clearing" loging out of the function and call it
directly if no match was found.

Diff Detail

Repository
rB Blender

Event Timeline

Azeem Bande-Ali (azeemba) requested review of this revision.Dec 6 2021, 12:45 AM
Azeem Bande-Ali (azeemba) created this revision.

I might be missing something, but in my test this does not solve the issue, yet. Can you make a short screen recording that shows it working with this patch?

Before:
Tab key doesn't complete to "tor".

After:
Tab key completes from t->tor and then from toru -> torus.

@Jacques Lucke (JacquesLucke) just wanted to check in to see if you had any thoughts on the video or additional feedback. Thanks!

This revision is now accepted and ready to land.Dec 9 2021, 11:08 AM