@@ -454,21 +454,13 @@ def complete(self, tab=False):
454454 Called whenever these should be updated, and called
455455 with tab
456456 """
457- if self .paste_mode and self .list_win_visible :
458- self .scr .touchwin ()
459-
460457 if self .paste_mode :
461- return
462-
463- if self .list_win_visible and not self .config .auto_display_list :
464- self .scr .touchwin ()
465- self .list_win_visible = False
466- self .matches_iter .clear ()
458+ self .scr .touchwin () #TODO necessary?
467459 return
468460
469461 if self .config .auto_display_list or tab :
470- self . list_win_visible = repl .Repl .complete (self , tab )
471- if self . list_win_visible :
462+ list_win_visible = repl .Repl .complete (self , tab )
463+ if list_win_visible :
472464 try :
473465 self .show_list (self .matches_iter .matches , topline = self .argspec , formatter = self .matches_iter .completer .format )
474466 except curses .error :
@@ -477,8 +469,8 @@ def complete(self, tab=False):
477469 # using it.
478470 self .list_win .border ()
479471 self .list_win .refresh ()
480- self . list_win_visible = False
481- if not self . list_win_visible :
472+ list_win_visible = False
473+ if not list_win_visible :
482474 self .scr .redrawwin ()
483475 self .scr .refresh ()
484476
@@ -1463,7 +1455,6 @@ def tab(self, back=False):
14631455 self .print_line (self .s )
14641456 if not self .matches_iter and self .config .auto_display_list :
14651457 self .complete ()
1466- #self.scr.touchwin() #TODO necessary?
14671458
14681459 # 4. swap current word for a match list item
14691460 elif self .matches_iter .matches :
0 commit comments