Commit 55dbc39e authored by mae's avatar mae
Browse files

Fix auto-indentation when pasting into a selection

parent 7aa24116
......@@ -4654,6 +4654,7 @@ void BaseTextEditor::insertFromMimeData(const QMimeData *source)
}
cursor.beginEditBlock();
cursor.removeSelectedText();
bool insertAtBeginningOfLine = ts.cursorIsAtBeginningOfLine(cursor);
......@@ -4664,8 +4665,6 @@ void BaseTextEditor::insertFromMimeData(const QMimeData *source)
return;
}
cursor.removeSelectedText();
int reindentBlockStart = cursor.blockNumber() + (insertAtBeginningOfLine?0:1);
bool hasFinalNewline = (text.endsWith(QLatin1Char('\n'))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment