Merge remote-tracking branch 'origin/4.5'

Change-Id: Iab6befd5e713289877aa0a47b9ce6bddfb5e2593
This commit is contained in:
Eike Ziller
2017-11-16 08:49:06 +01:00
38 changed files with 200 additions and 58 deletions

View File

@@ -131,7 +131,7 @@ QTextCursor TextDocumentPrivate::indentOrUnindent(const QTextCursor &textCursor,
bool modified = true;
QTextBlock startBlock = m_document.findBlock(start);
QTextBlock endBlock = m_document.findBlock(blockSelection ? end : end - 1).next();
QTextBlock endBlock = m_document.findBlock(blockSelection ? end : qMax(end - 1, 0)).next();
const bool cursorAtBlockStart = (textCursor.position() == startBlock.position());
const bool anchorAtBlockStart = (textCursor.anchor() == startBlock.position());
const bool oneLinePartial = (startBlock.next() == endBlock)