Ignore whitespace patterns in ib search

symbol_search
Tyler Goodlet 2021-05-19 08:47:28 -04:00
parent 64c1d9a965
commit ddc2c8975a
1 changed files with 2 additions and 3 deletions

View File

@ -1286,13 +1286,12 @@ async def open_symbol_search(
await trio.sleep(diff) await trio.sleep(diff)
try: try:
pattern = stream.receive_nowait() pattern = stream.receive_nowait()
# if new:
# pattern = new
except trio.WouldBlock: except trio.WouldBlock:
pass pass
if not pattern: if not pattern or pattern.isspace():
log.warning('empty pattern received, skipping..') log.warning('empty pattern received, skipping..')
await stream.send(matches)
continue continue
log.debug(f'searching for {pattern}') log.debug(f'searching for {pattern}')