diff options
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index bd3ded01780..e8fcd7a0f40 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -2056,8 +2056,13 @@ static void ui_textedit_end(bContext *C, uiBut *but, uiHandleButtonData *data) } if (data->searchbox) { - if (data->cancel == false) - ui_searchbox_apply(but, data->searchbox); + if (data->cancel == false) { + if ((ui_searchbox_apply(but, data->searchbox) == false) || + (ui_searchbox_find_index(data->searchbox, but->editstr) == -1)) + { + data->cancel = true; + } + } ui_searchbox_free(C, data->searchbox); data->searchbox = NULL; |