Hi @alen-liao,
The lv_obj_set_size() function will overwrite size of lv_textarea_set_one_line(), so text area will be scrollable while the object height is smaller than text font height, but it's still in the one line mode since the text always keeping in one line.
If you call lv_textarea_set_one_line() after lv_obj_set_size() the object height will be overwrite by the text font height, which will cause inconsistent effect between editor and simulator/target.
Default:

call lv_textarea_set_one_line() at end:

We are trying to make sure that the editor and the actual effect are consistent, and this is why I suggest you adjust widget size, padding and text font size to get a better result.

Best Regards,
Wenbin