FakeVim: Fix invalid cursor position warnings

Change-Id: If09f2cfeb58e9810ec3858c0a20d2f5e0a7fac14
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Lukas Holecek
2014-11-22 11:52:44 +01:00
committed by hjk
parent e1bb214147
commit e8aecca215

View File

@@ -3284,7 +3284,7 @@ void FakeVimHandler::Private::fixSelection()
if (g.movetype == MoveInclusive) {
// If position or anchor is after end of non-empty line, include line break in selection.
if (characterAtCursor() == ParagraphSeparator) {
if (!atEmptyLine()) {
if (!atEmptyLine() && !atDocumentEnd()) {
setPosition(position() + 1);
return;
}