| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 766f8e4 commit ec1f436
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -454,21 +454,13 @@ def complete(self, tab=False): | |||
| 454 | 454 | Called whenever these should be updated, and called | |
| 455 | 455 | with tab | |
| 456 | 456 | """ | |
| 457 | - if self.paste_mode and self.list_win_visible: | ||
| 458 | - self.scr.touchwin() | ||
| 459 | - | ||
| 460 | 457 | 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? | ||
| 467 | 459 | return | |
| 468 | 460 | ||
| 469 | 461 | 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: | ||
| 472 | 464 | try: | |
| 473 | 465 | self.show_list(self.matches_iter.matches, topline=self.argspec, formatter=self.matches_iter.completer.format) | |
| 474 | 466 | except curses.error: | |
@@ -477,8 +469,8 @@ def complete(self, tab=False): | |||
| 477 | 469 | # using it. | |
| 478 | 470 | self.list_win.border() | |
| 479 | 471 | 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: | ||
| 482 | 474 | self.scr.redrawwin() | |
| 483 | 475 | self.scr.refresh() | |
| 484 | 476 | ||
@@ -1463,7 +1455,6 @@ def tab(self, back=False): | |||
| 1463 | 1455 | self.print_line(self.s) | |
| 1464 | 1456 | if not self.matches_iter and self.config.auto_display_list: | |
| 1465 | 1457 | self.complete() | |
| 1466 | - #self.scr.touchwin() #TODO necessary? | ||
| 1467 | 1458 | ||
| 1468 | 1459 | # 4. swap current word for a match list item | |
| 1469 | 1460 | elif self.matches_iter.matches: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -420,7 +420,6 @@ def __init__(self, interp, config): | |||
| 420 | 420 | self.argspec = None | |
| 421 | 421 | self.current_func = None | |
| 422 | 422 | self.highlighted_paren = None | |
| 423 | - self.list_win_visible = False | ||
| 424 | 423 | self._C = {} | |
| 425 | 424 | self.prev_block_finished = 0 | |
| 426 | 425 | self.interact = Interaction(self.config) | |
@@ -641,8 +640,7 @@ def complete(self, tab=False): | |||
| 641 | 640 | self.current_line(), | |
| 642 | 641 | matches, completer) | |
| 643 | 642 | self.matches_iter.next() | |
| 644 | - self.list_win_visible = True #TODO what else is list_win_visible used for? | ||
| 645 | - if tab: # if this complete is being run for a tab key press, do the swap | ||
| 643 | + if tab: # if this complete is being run for a tab key press, tab() to do the swap | ||
| 646 | 644 | self.tab() | |
| 647 | 645 | self.matches_iter.clear() | |
| 648 | 646 | return False | |
| Back | FazBrowse Home | New Git URL |
0 commit comments