forked from qt-creator/qt-creator
Editor: avoid duplicated line endings inbetween multiple cursors
Change-Id: Ia1721837efef47d570faa4e393b6b0b372944735 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -132,8 +132,11 @@ QString MultiTextCursor::selectedText() const
|
|||||||
const QString &cursorText = cursor.selectedText();
|
const QString &cursorText = cursor.selectedText();
|
||||||
if (cursorText.isEmpty())
|
if (cursorText.isEmpty())
|
||||||
continue;
|
continue;
|
||||||
if (!text.isEmpty())
|
if (!text.isEmpty()) {
|
||||||
|
if (text.endsWith(QChar::ParagraphSeparator))
|
||||||
|
text.chop(1);
|
||||||
text.append('\n');
|
text.append('\n');
|
||||||
|
}
|
||||||
text.append(cursorText);
|
text.append(cursorText);
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
|
Reference in New Issue
Block a user