fix textbox caret_pos issue
This commit is contained in:
@@ -1840,8 +1840,11 @@ namespace nana{ namespace widgets
|
||||
|
||||
//move_caret
|
||||
//Set caret position through text coordinate
|
||||
void text_editor::move_caret(const upoint& crtpos)
|
||||
void text_editor::move_caret(const upoint& crtpos, bool reset_caret)
|
||||
{
|
||||
if (reset_caret)
|
||||
points_.caret = crtpos;
|
||||
|
||||
if (!API::is_focus_ready(window_))
|
||||
return;
|
||||
|
||||
|
||||
@@ -345,7 +345,7 @@ namespace drawerbase {
|
||||
auto editor = get_drawer_trigger().editor();
|
||||
internal_scope_guard lock;
|
||||
if (editor)
|
||||
editor->move_caret(pos);
|
||||
editor->move_caret(pos, true);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user