diff --git a/qutebrowser/models/completion.py b/qutebrowser/models/completion.py index ffc3a83b7..8630e0c1e 100644 --- a/qutebrowser/models/completion.py +++ b/qutebrowser/models/completion.py @@ -210,10 +210,13 @@ class QuickmarkCompletionModel(basecompletion.BaseCompletionModel): for qm_name, qm_url in objreg.get('quickmark-manager').marks.items(): qmlist.append((qm_url, qm_name)) - if match_field == 'name': + elif match_field == 'name': for qm_name, qm_url in objreg.get('quickmark-manager').marks.items(): qmlist.append((qm_name, qm_url)) + else: + raise ValueError("Invalid value '{}' for match_field!".format(match_field)) + cat = self.new_category("Quickmarks") for (name, desc) in qmlist: self.new_item(cat, name, desc)