We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36d4fe4 commit 8c8dcdbCopy full SHA for 8c8dcdb
1 file changed
src/widgets/qmdieditor.cpp
@@ -979,7 +979,8 @@ bool qmdiEditor::saveFile(const QString &newFileName) {
979
auto currentText = block.text();
980
981
if (trimSpacesOnSave) {
982
- currentText = currentText.trimmed();
+ auto static RE = QRegularExpression("\\s+$");
983
+ currentText.remove(RE);
984
if (currentText != block.text()) {
985
cursor.setPosition(block.position());
986
cursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
0 commit comments