pylint fix, change if len(text) to if text

This commit is contained in:
Justin Partain 2017-10-26 13:00:07 -04:00
parent 8451899a76
commit 9f511fe18c

View File

@ -249,6 +249,6 @@ class Command(misc.MinimalLineEditMixin, misc.CommandLineEdit):
'?': 'search -r -- ',
}
# len(text) check is for when user presses <Esc>
if self.prefix() in '/?' and len(text) != 0:
# `if text` check is for when user presses <Esc> and `len(text)` is 0
if self.prefix() in '/?' and text:
self.got_cmd[str].emit(search_prefixes[text[0]] + text[1:])