Skip to content

Commit

Permalink
Change std::string::length() to utf8::size() for unicode characters
Browse files Browse the repository at this point in the history
  • Loading branch information
fujimo-t authored and Vultraz committed Feb 28, 2017
1 parent 05bc654 commit de090c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/widgets/text_box_base.cpp
Expand Up @@ -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);
}
Expand Down

0 comments on commit de090c1

Please sign in to comment.