summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayne Cheng <waynethecheng@gmail.com>2020-07-07 21:25:41 -0400
committerFlorian Bruhin <me@the-compiler.org>2020-07-10 16:21:59 +0200
commit302e55a48fa09037ef502885a9a73247be843527 (patch)
tree6c3a6caa979009c2c59f1b473aa8fbe2d44a85ea
parent106a3a202ecf71c9620f513988e0af730adf0a44 (diff)
downloadqutebrowser-302e55a48fa09037ef502885a9a73247be843527.tar.gz
qutebrowser-302e55a48fa09037ef502885a9a73247be843527.zip
qute-lastpass merge-candidate bugfix from @user202729
(cherry picked from commit 4f83bf655974e55f78e600026a4947ad00694297)
-rwxr-xr-xmisc/userscripts/qute-lastpass6
1 files changed, 5 insertions, 1 deletions
diff --git a/misc/userscripts/qute-lastpass b/misc/userscripts/qute-lastpass
index e58f4c817..01b7a7624 100755
--- a/misc/userscripts/qute-lastpass
+++ b/misc/userscripts/qute-lastpass
@@ -115,6 +115,7 @@ def main(arguments):
# the registered domain name and finally: the IPv4 address if that's what
# the URL represents
candidates = []
+ seen_id = set()
for target in filter(None, [extract_result.fqdn, extract_result.registered_domain, extract_result.subdomain + extract_result.domain, extract_result.domain, extract_result.ipv4]):
target_candidates, err = pass_(target, arguments.io_encoding)
if err:
@@ -124,7 +125,10 @@ def main(arguments):
if not target_candidates:
continue
- candidates = candidates + target_candidates
+ for candidate in target_candidates:
+ if candidate["id"] not in seen_id:
+ seen_id.add(candidate["id"])
+ candidates.append(candidate)
if not arguments.merge_candidates:
break
else: