From b03e79f9a5e56fbd590ff9a58619df4c04cd6405 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sat, 3 Mar 2018 15:29:03 +0100 Subject: [PATCH] LocationBar: Only complete domain when not empty This actually fixes issue where pasting text in the middle of text would remove everything after pasted text. --- src/lib/navigation/locationbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/navigation/locationbar.cpp b/src/lib/navigation/locationbar.cpp index 749900a5a..08782b182 100644 --- a/src/lib/navigation/locationbar.cpp +++ b/src/lib/navigation/locationbar.cpp @@ -187,7 +187,7 @@ void LocationBar::showDomainCompletion(const QString &completion) // We need to manually force the completion because model is updated asynchronously // But only force completion when the user actually added new text - if (m_oldTextLength < m_currentTextLength) + if (!completion.isEmpty() && m_oldTextLength < m_currentTextLength) completer()->complete(); }