--- a/eric6/Plugins/VcsPlugins/vcsMercurial/GpgExtension/HgGpgSignaturesDialog.py Wed Apr 21 17:56:12 2021 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsMercurial/GpgExtension/HgGpgSignaturesDialog.py Wed Apr 21 19:40:50 2021 +0200 @@ -227,11 +227,12 @@ """ searchRxText = self.rxEdit.text() filterTop = self.categoryCombo.currentText() == self.tr("Revision") - if filterTop and searchRxText.startswith("^"): - searchRx = re.compile( + searchRx = ( + re.compile( r"^\s*{0}".format(searchRxText[1:]), re.IGNORECASE) - else: - searchRx = re.compile(searchRxText, re.IGNORECASE) + if filterTop and searchRxText.startswith("^") else + re.compile(searchRxText, re.IGNORECASE) + ) for topIndex in range(self.signaturesList.topLevelItemCount()): topLevelItem = self.signaturesList.topLevelItem(topIndex) if filterTop: