I did something, but a pair of things with bugs (details below).
From my list of the first post I implemented the following (maybe I don't know about any potential problems, but so far I didn't notice a lot of bugs at work. Only a pair as I said):
- Pressed Shift (yes) (*old bug with the '\n' and RightKey I suppose, only at the end of the current line, and it's buggy only with Shift selecting, details below)
- Pressed Control (yes)
- Double-click (yes)
- Home (yes)
- End (yes)
- Ctrl+Home (yes)
- Ctrl+End (yes)
- PageUp (yes) (*may be bug again with the Shift-selection, in special situations my app throws, I think problem not with the PageUp key, but with the Shift. I didn't even know at what point might throw, but I'll try to understand)
- PageDown (yes)
Easier to see the code.
All problems abut to the return from the current line to the next. All that is needed is to miss the symbol '\n' wherever it appears on the way of 'm_selEnd'.
The bug algorithm that I saw (now when Shift pressed):
>> Cursor at the end of a paragraph
>> Pressing the right arrow
>> The cursor moves to the beginning of the NEXT line (it's ok), but the NEXT line moves to the end of the CURRENT line! The CURRENT and NEXT line are joined now when '\n' selected!

>> Pressing the right arrow again
>> Now the cursor is moved to the second character of the next line, and the next line gets to its rightful place)
In the source TextBox.cpp:
1) in the "leftMousePressed" function only the following lines was replaced with new word-selection code:
// Select the whole text
m_selStart = {0, 0};
m_selEnd = sf::Vector2<std::size_t>(m_lines[m_lines.size()-1].getSize(), _lines.size()-1);
2) in the "keyPressed" function:
case sf::Keyboard::Up: (nearly all corrected)
case sf::Keyboard::Down: (nearly all corrected)
case sf::Keyboard::Left: (nearly all corrected)
case sf::Keyboard::Right: (nearly all corrected) (*but here lies the bug with selection of '\n')
case sf::Keyboard::Home: (nearly all corrected)
case sf::Keyboard::End: (nearly all corrected)
case sf::Keyboard::PageUp: (added)
case sf::Keyboard::PageDown: (added)
3) When I corrected I questioned the need for the following code:
if (m_selStart != m_selEnd)
{
if ((m_selStart.y > m_selEnd.y) || ((m_selStart.y == m_selEnd.y) && (m_selStart.x > m_selEnd.x)))
m_selStart = m_selEnd;
else
m_selEnd = m_selStart;
}
...
because the selection is still lost in the end of the keys' method execution. In any case, I haven't noticed significant differences. In my case, all selection-deselection problems decided a simple condition:
if (!event.key.shift) m_selStart = m_selEnd;
But may be I'm wrong.
Summary:
The bug with the Union "Shift-selection + jumping next line" is tolerable because app isn't throws.
But the bug with the Union "Shift-selection + PageUp" very unstable, it's seriously, than the jumping line.
I will still think with it.