From b97e0f341179fc157d5c9728e83271cd841eca0a Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Sun, 20 Jan 2019 23:27:32 -0500 Subject: [PATCH] Make sure selected text found matches search --- mainwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 6ad95ec..6f2f8ee 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -5605,7 +5605,8 @@ int MainWindow::writeMessageTextToUI(QDateTime date, QString text, int freq, boo // fixup duplicate acks auto tc = c.document()->find(text); - if(!tc.isNull() && text.contains(" ACK ")){ + if(!tc.isNull() && tc.selectedText() == text && text.contains(" ACK ")){ + qDebug() << "found" << tc.selectedText() << "so not displaying..."; return tc.blockNumber(); }