forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.5'
Change-Id: Iab6befd5e713289877aa0a47b9ce6bddfb5e2593
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user