Skip to content

Commit 9cf772d

Browse files
committed
Fix for multiline
1 parent 7e736a5 commit 9cf772d

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

addons/src/addons-context.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
#include <algorithm> // for max, min
2121

22-
#include <QChar> // for QChar
22+
#include <QChar> // for QChar::LineFeed, QChar::ParagraphSeparator
2323
#include <QPlainTextEdit> // for QPlainTextEdit
2424
#include <QTextCursor> // for QTextCursor, QTextCursor::KeepAnchor, QTextCursor::MoveAnchor, QTextCursor::End
2525

@@ -87,7 +87,7 @@ bool Addons::Context::pull(int mode)
8787
m_fragmentStart = cursor.position();
8888
m_fragmentEnd = cursor.anchor();
8989
m_text = cursor.selectedText();
90-
m_text.replace(QChar(0x2029), '\n');
90+
m_text.replace(QChar::ParagraphSeparator, QChar::LineFeed);
9191

9292
return true;
9393
}

addons/src/blockskip/utils-blockskip.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1919
*/
2020

21-
#include <QChar> // for QChar, QChar::ParagraphSeparator
21+
#include <QChar> // for QChar, QChar::LineFeed
2222
#include <QRegularExpression> // for QRegularExpression
2323
#include <QRegularExpressionMatch> // for QRegularExpressionMatch
2424
#include <QString> // for QString
@@ -66,7 +66,7 @@ void Utils::blockSkip(QString& tx, bool remove, bool inc)
6666
}
6767
}
6868

69-
QStringList list = tx.split(QChar::ParagraphSeparator);
69+
QStringList list = tx.split(QChar::LineFeed);
7070

7171
if (list.isEmpty()) {
7272
list.append(tx);

addons/src/comment/utils-comment.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1919
*/
2020

21-
#include <QChar> // for operator==, QChar, QChar::ParagraphSeparator
21+
#include <QChar> // for operator==, QChar, QChar::LineFeed
2222
#include <QString> // for QString, QCharRef
2323
#include <QStringList> // for QStringList
2424
#include <QtGlobal> // for QForeachContainer, qMakeForeachContainer, foreach
@@ -28,7 +28,7 @@
2828

2929
void Utils::paraComment(QString& tx)
3030
{
31-
QStringList list = tx.split(QChar::ParagraphSeparator);
31+
QStringList list = tx.split(QChar::LineFeed);
3232
bool remove = false;
3333

3434
if (tx[0] == '(') {
@@ -66,7 +66,7 @@ void Utils::paraComment(QString& tx)
6666

6767
void Utils::semiComment(QString& tx)
6868
{
69-
QStringList list = tx.split(QChar::ParagraphSeparator);
69+
QStringList list = tx.split(QChar::LineFeed);
7070
bool remove = false;
7171

7272
if (tx[0] == ';') {

0 commit comments

Comments
 (0)