Fix crash in extendSelection

Authored by pavelkh on Dec 29 2018, 2:01 PM.

Description

Fix crash in extendSelection

Summary:
Fix crash when doing word selection or line selection
and moving the cursor to the end of the screen.
After 4e09f089f940335bdd628139e870ba99721fddfa
Konsole tries to read out of bounds when you double
click to select a whole empty line, and hold down the
mouse button and drag to the right.

Note: still crashes with on some extendSelections
such when y=-1

BUG: 402452

Test Plan:
Doesn't crash anymore, selecting the last column works,
both in normal selection, line selection and word selection.

Reviewers: Konsole, hindenburg

Reviewed By: Konsole, hindenburg

Differential Revision: https://phabricator.kde.org/D17757

Details

Committed
hindenburgDec 29 2018, 2:04 PM
Reviewer
Konsole
Differential Revision
D17757: Fix crash in extendSelection
Parents
R319:8c94b21980d0: Correct includes
Branches
Unknown
Tags
Unknown
Reverted By
R319:213afc0e0cee: Revert "Fix crash in extendSelection"