@@ -295,6 +295,7 @@ def __init__(self, streams_btn_list: List[Any], view: Any) -> None:
295
295
self .view = view
296
296
self .log = urwid .SimpleFocusListWalker (streams_btn_list )
297
297
self .streams_btn_list = streams_btn_list
298
+ self .in_search_mode = False
298
299
self .focus_index_before_search = 0
299
300
list_box = urwid .ListBox (self .log )
300
301
self .stream_search_box = PanelSearchBox (self ,
@@ -356,6 +357,7 @@ def mouse_event(self, size: urwid_Size, event: str, button: int, col: int,
356
357
357
358
def keypress (self , size : urwid_Size , key : str ) -> Optional [str ]:
358
359
if is_command_key ('SEARCH_STREAMS' , key ):
360
+ self .in_search_mode = True
359
361
self .set_focus ('header' )
360
362
return key
361
363
elif is_command_key ('GO_BACK' , key ):
@@ -365,9 +367,11 @@ def keypress(self, size: urwid_Size, key: str) -> Optional[str]:
365
367
self .set_focus ('body' )
366
368
self .log .set_focus (self .focus_index_before_search )
367
369
self .view .controller .update_screen ()
370
+ self .in_search_mode = False
368
371
return key
369
372
return_value = super ().keypress (size , key )
370
- _ , self .focus_index_before_search = self .log .get_focus ()
373
+ if not self .in_search_mode :
374
+ _ , self .focus_index_before_search = self .log .get_focus ()
371
375
return return_value
372
376
373
377
0 commit comments