@@ -403,7 +403,10 @@ def keypress(self, size: urwid_Size, key: str) -> Optional[str]:
403
403
self .stream_search_box .set_caption (" " )
404
404
self .view .controller .enter_editor_mode_with (self .stream_search_box )
405
405
return key
406
- elif is_command_key ("GO_BACK" , key ):
406
+ elif (
407
+ is_command_key ("GO_BACK" , key )
408
+ and self .search_status != SearchStatus .DEFAULT
409
+ ):
407
410
self .stream_search_box .reset_search_text ()
408
411
self .log .clear ()
409
412
self .log .extend (self .streams_btn_list )
@@ -528,7 +531,10 @@ def keypress(self, size: urwid_Size, key: str) -> Optional[str]:
528
531
self .topic_search_box .set_caption (" " )
529
532
self .view .controller .enter_editor_mode_with (self .topic_search_box )
530
533
return key
531
- elif is_command_key ("GO_BACK" , key ):
534
+ elif (
535
+ is_command_key ("GO_BACK" , key )
536
+ and self .search_status != SearchStatus .DEFAULT
537
+ ):
532
538
self .topic_search_box .reset_search_text ()
533
539
self .log .clear ()
534
540
self .log .extend (self .topics_btn_list )
@@ -772,7 +778,10 @@ def keypress(self, size: urwid_Size, key: str) -> Optional[str]:
772
778
self .user_search .set_caption (" " )
773
779
self .view .controller .enter_editor_mode_with (self .user_search )
774
780
return key
775
- elif is_command_key ("GO_BACK" , key ):
781
+ elif (
782
+ is_command_key ("GO_BACK" , key )
783
+ and self .search_status != SearchStatus .DEFAULT
784
+ ):
776
785
self .user_search .reset_search_text ()
777
786
self .allow_update_user_list = True
778
787
self .body = UsersView (self .view .controller , self .users_btn_list )
0 commit comments