Fixed newline processing

This commit is contained in:
Jordan Sherer 2019-11-15 09:45:54 -05:00
parent 28fbce38b4
commit ba3e521cf3

View File

@ -245,7 +245,7 @@ void TransmitTextEdit::on_textContentsChanged(int /*pos*/, int rem, int add){
QString normalized = text.normalized(QString::NormalizationForm_KD); QString normalized = text.normalized(QString::NormalizationForm_KD);
QString result; QString result;
std::copy_if(normalized.begin(), normalized.end(), std::back_inserter(result), [](QChar& c) { std::copy_if(normalized.begin(), normalized.end(), std::back_inserter(result), [](QChar& c) {
return c.toLatin1() != 0 && c > 31 && c < 128; return c.toLatin1() != 0 && (c == 10 || (c > 31 && c < 128));
}); });
if(result != text){ if(result != text){
bool blocked = signalsBlocked(); bool blocked = signalsBlocked();