Change std::string::length() to utf8::size() for unicode characters
This commit is contained in:
parent
05bc654e76
commit
de090c164c
1 changed files with 1 additions and 1 deletions
|
@ -154,7 +154,7 @@ void text_box_base::insert_char(const utf8::string& unicode)
|
|||
if(text_.insert_text(selection_start_, unicode)) {
|
||||
|
||||
// Update status
|
||||
set_cursor(selection_start_ + unicode.length(), false);
|
||||
set_cursor(selection_start_ + utf8::size(unicode), false);
|
||||
update_canvas();
|
||||
set_is_dirty(true);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue