diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 1d613fd0a0e..d8e5dbe639e 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -1229,12 +1229,12 @@ static void ui_textedit_set_cursor_pos(uiBut *but, uiHandleButtonData *data, sho } /* mouse inside the widget */ else if (x >= startx) { - float aspect= sqrt(but->block->aspect); + float aspect= (but->block->aspect); but->pos= strlen(origstr)-but->ofs; /* XXX does not take zoom level into account */ - while (aspect*startx + aspect*BLF_width(fstyle->uifont_id, origstr+but->ofs) > x) { + while (startx + aspect*BLF_width(fstyle->uifont_id, origstr+but->ofs) > x) { if (but->pos <= 0) break; but->pos--; origstr[but->pos+but->ofs] = 0;