From d75691ce9e0f40ffbfd0dcdc276e5da978509c03 Mon Sep 17 00:00:00 2001 From: wx-Yao Date: Sun, 28 Jul 2019 19:59:11 +1000 Subject: [PATCH] fix a problem that disable --search option --- lib/options.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/options.py b/lib/options.py index a086928..f759f72 100644 --- a/lib/options.py +++ b/lib/options.py @@ -9,12 +9,12 @@ def __init__(self, parser, workflow): return None def search(self, sheetName, keyword): - if sheetName not in self._parser.availableSheets(): - Options.warning("Cheat sheet not found.","", self._workflow) - return None if sheetName==None: ret=self._parser.searchAcrossAll(keyword, self._workflow) else: + if sheetName not in self._parser.availableSheets(): + Options.warning("Cheat sheet not found.","", self._workflow) + return None ret=self._parser.searchInSheet(keyword, sheetName, self._workflow) if ret==[]: Options.warning("Not found", "No match found for search {}".format(keyword), self._workflow)