Ignore whitespace patterns in ib search
parent
64c1d9a965
commit
ddc2c8975a
|
@ -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}')
|
||||||
|
|
Loading…
Reference in New Issue