editor: fix assert to take preedit string into account
This commit is contained in:
committed by
Kristian Høgsberg
parent
3b132e358f
commit
237358be93
+2
-1
@@ -500,7 +500,8 @@ text_entry_update_layout(struct text_entry *entry)
|
|||||||
{
|
{
|
||||||
char *text;
|
char *text;
|
||||||
|
|
||||||
assert(((unsigned int)entry->cursor) <= strlen(entry->text));
|
assert(((unsigned int)entry->cursor) <= strlen(entry->text) +
|
||||||
|
(entry->preedit_text ? strlen(entry->preedit_text) : 0));
|
||||||
|
|
||||||
if (!entry->preedit_text) {
|
if (!entry->preedit_text) {
|
||||||
text_layout_set_text(entry->layout, entry->text);
|
text_layout_set_text(entry->layout, entry->text);
|
||||||
|
|||||||
Reference in New Issue
Block a user