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:
X512 2020-01-12 23:33:32 +09:00 committed by Niels Sascha Reedijk
parent 3cd3b7029b
commit 08e58a41e5

View File

@ -4915,6 +4915,8 @@ BTextView::_MessageDropped(BMessage* message, BPoint where, BPoint offset)
}
Insert(dropOffset, text, dataLength, runArray);
if (IsFocus())
Select(dropOffset, dropOffset + dataLength);
}
return true;