Fix crash when extending selection
Summary:
When doing word selection use the previous selection anchor if the new one is out of bounds (user scrolled out of view or similar).
A more proper (but still not really proper) fix than b85bbaa8c8807ab3619cddc35b634c2bb43e09fb reverted by 213afc0e0ceebc88c90552cd91fa8680e54603ed
I have a branch refactoring the word selection stuff a bit, but it's a bit more invasive. This is the minimal change I could get to fix it.
Test Plan: see b85bbaa8c8807ab3619cddc35b634c2bb43e09fb 213afc0e0ceebc88c90552cd91fa8680e54603ed 914067d14a6a27b59bba1c53cc18cb67eb9811fc
Reviewers: hindenburg, pavelkh, ngraham
Reviewed By: hindenburg
Subscribers: konsole-devel
Tags: Konsole
Differential Revision: https://phabricator.kde.org/D18862