Fix crash when extending selection

Authored by sandsmark on Feb 11 2019, 10:09 PM.

Description

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

Details

Committed
hindenburgFeb 11 2019, 10:16 PM
Reviewer
hindenburg
Differential Revision
D18862: Fix crash when extending selection
Parents
R319:dd6cddfd9944: Use QOverload instead of static_cast for connection overloads
Branches
Unknown
Tags
Unknown