improve textbox's selection handling refs #19, #1

This commit is contained in:
beru
2015-05-24 23:25:39 +09:00
parent 2776365fdf
commit 21dc2aa48c
2 changed files with 9 additions and 28 deletions

View File

@@ -92,11 +92,13 @@ namespace drawerbase {
void drawer::focus(graph_reference graph, const arg_focus& arg)
{
refresh(graph);
if (arg.getting) {
if (!editor_->attr().multi_lines && arg.getting)
{
static auto& brock = detail::bedrock::instance();
auto native_window = reinterpret_cast<native_window_type>(arg.receiver);
auto* root_runtime = brock.wd_manager.root_runtime(native_window);
if (root_runtime && root_runtime->condition.tabstop_focus_changed) {
if (root_runtime && root_runtime->condition.tabstop_focus_changed)
{
editor_->select(true);
editor_->move_caret_end();
}