improve edit

This commit is contained in:
xianjimli 2020-04-07 18:06:38 +08:00
parent e169bb0405
commit d599eb8c09
2 changed files with 3 additions and 2 deletions

View File

@ -4,6 +4,7 @@
* 完善 slide\_view\_set\_active/pages\_set\_active * 完善 slide\_view\_set\_active/pages\_set\_active
* 优化 list view paint * 优化 list view paint
* 优化 widget\_set\_need\_relayout\_children * 优化 widget\_set\_need\_relayout\_children
* 完善 edit (感谢尧燊提供补丁)。
* 2020/04/05 * 2020/04/05
* pages 切换时保存和恢复焦点。 * pages 切换时保存和恢复焦点。

View File

@ -1117,7 +1117,7 @@ ret_t edit_inc(edit_t* edit) {
default: default:
break; break;
} }
text_edit_set_cursor(edit->model, 0xffffffff); text_edit_select_all(edit->model);
return widget_invalidate_force(widget, NULL); return widget_invalidate_force(widget, NULL);
} }
@ -1155,7 +1155,7 @@ ret_t edit_dec(edit_t* edit) {
break; break;
} }
text_edit_set_cursor(edit->model, 0xffffffff); text_edit_select_all(edit->model);
return widget_invalidate_force(widget, NULL); return widget_invalidate_force(widget, NULL);
} }