Fix #29958: Search Menu keeps hiding first character(s) after long input
- ui_check_but() in ui_textedit_move() is necessary because this function clips but->drawstring to fit text entry widget and it confuses cursor movement stuff. ui_check_but copies editstring to drawstring, so displaystring would be clipped again in correct way. - If the whole drawstring fits widget, no need to set button's offset.
This commit is contained in:
@@ -952,6 +952,9 @@ static void ui_text_leftclip(uiFontStyle *fstyle, uiBut *but, rcti *rect)
|
||||
if(but->editstr && but->pos >= 0) {
|
||||
if(but->ofs > but->pos)
|
||||
but->ofs= but->pos;
|
||||
|
||||
if(BLF_width(fstyle->uifont_id, but->drawstr) <= okwidth)
|
||||
but->ofs = 0;
|
||||
}
|
||||
else but->ofs= 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user