Skip to content

Commit

Permalink
improve text edit
Browse files Browse the repository at this point in the history
  • Loading branch information
xianjimli committed Jan 3, 2025
1 parent f72a949 commit 3aa4091
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

2025/01/03
* 完善 bitmap API 注释(感谢朝泽提供补丁)
* 完善 text edit(感谢泽武提供补丁)

2025/01/02
* 去掉重复的宏定义(感谢俊杰发现问题)
Expand Down
2 changes: 1 addition & 1 deletion src/base/text_edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -2384,7 +2384,7 @@ static ret_t text_edit_insert_wtext_with_len(text_edit_t* text_edit, uint32_t of

len = text_edit_insert(text_edit, offset, (wchar_t*)wtext, len);

ret = !!len ? RET_OK : RET_SKIP;
ret = len > 0 ? RET_OK : RET_SKIP;

if (ret == RET_OK) {
if (impl->single_line) {
Expand Down
2 changes: 1 addition & 1 deletion src/base/text_edit.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ ret_t text_edit_layout(text_edit_t* text_edit);

/**
* @method text_edit_muti_line_insert_text_layout
* 重新排版。
* 插入字符串后的重新排版。(内部使用函数)
* @param {text_edit_t*} text_edit text_edit对象。
* @param {uint32_t} offset 插入的字符串偏移。
* @param {uint32_t} insert_length 插入的字符串长度。
Expand Down

0 comments on commit 3aa4091

Please sign in to comment.