TextView: Select dropped text if focused
This is convenient and used in most text editors. Change-Id: Ia39b9e6f16cc381a62e10b248033729179a0996c Reviewed-on: https://review.haiku-os.org/c/haiku/+/2110 Reviewed-by: waddlesplash <waddlesplash@gmail.com> Reviewed-by: John Scipione <jscipione@gmail.com> Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
This commit is contained in:
parent
3cd3b7029b
commit
08e58a41e5
@ -4915,6 +4915,8 @@ BTextView::_MessageDropped(BMessage* message, BPoint where, BPoint offset)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Insert(dropOffset, text, dataLength, runArray);
|
Insert(dropOffset, text, dataLength, runArray);
|
||||||
|
if (IsFocus())
|
||||||
|
Select(dropOffset, dropOffset + dataLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user