diff --git a/frontend/ui/widget/dictquicklookup.lua b/frontend/ui/widget/dictquicklookup.lua
index 66e55c31c..e5de1a624 100644
--- a/frontend/ui/widget/dictquicklookup.lua
+++ b/frontend/ui/widget/dictquicklookup.lua
@@ -1160,12 +1160,7 @@ function DictQuickLookup:changeDictionary(index, skip_update)
-- add queried word to 1st result's definition, so we can see
-- what was the selected text and if we selected wrong
if index == 1 then
- if self.is_html then
- self.definition = self.definition.."
_______
"
- else
- self.definition = self.definition.."\n_______\n"
- end
- self.definition = self.definition..T(_("(query : %1)"), self.word)
+ self:addQueryWordToResult()
end
end
self.displaydictname = self.dictionary
@@ -1188,6 +1183,16 @@ function DictQuickLookup:changeDictionary(index, skip_update)
end
end
+function DictQuickLookup:addQueryWordToResult()
+ -- Extracted to a separate method so it can be removed by user patches.
+ if self.is_html then
+ self.definition = self.definition.."
_______
"
+ else
+ self.definition = self.definition.."\n_______\n"
+ end
+ self.definition = self.definition..T(_("(query : %1)"), self.word)
+end
+
--[[ No longer used
function DictQuickLookup:changeToDefaultDict()
if self.dictionary then