Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.12.0 Alpha
-
None
Description
It's a bug found on kde, but it's a QTextEdit bug:
"
SUMMARY
Double-click&drag selection does not let you select the first word in line.
STEPS TO REPRODUCE
1. Double click on a word in KTextEdit to start selection of several whole words.
2. Keep holding the left mouse button and move the pointer to the left of text edit.
OBSERVED RESULT
In the line "A set of blank cards is shown. Each card has a picture on the other side, ", the first word "A" is never selected.
EXPECTED RESULT
Every word till the beginning of the line should be selected."
I attached a test case.
And I created a patch for it (but not sure if it's correct).
When we have just one characters as "a set dd" when we try to call:
if (!curs.movePosition(QTextCursor::StartOfWord)) it will return false, as
we are not in a word. it will return so it will not select this character.
We will same problem when we select have an unique character at the end of line.
But my patch will not fix it.
(test with: "a foo bla e" and double click on "bla" and try to select last character "e")
Regards