| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -461,7 +461,9 @@ def complete(self, tab=False): | |||
| 461 | 461 | list_win_visible = repl.Repl.complete(self, tab) | |
| 462 | 462 | if list_win_visible: | |
| 463 | 463 | try: | |
| 464 | - self.show_list(self.matches_iter.matches, topline=self.argspec, formatter=self.matches_iter.completer.format) | ||
| 464 | + self.show_list(self.matches_iter.matches, self.arg_pos, | ||
| 465 | + topline=self.funcprops, | ||
| 466 | + formatter=self.matches_iter.completer.format) | ||
| 465 | 467 | except curses.error: | |
| 466 | 468 | # XXX: This is a massive hack, it will go away when I get | |
| 467 | 469 | # cusswords into a good enough state that we can start | |
@@ -691,7 +693,7 @@ def lf(self): | |||
| 691 | 693 | self.print_line(self.s, newline=True) | |
| 692 | 694 | self.echo("\n") | |
| 693 | 695 | ||
| 694 | - def mkargspec(self, topline, down): | ||
| 696 | + def mkargspec(self, topline, in_arg, down): | ||
| 695 | 697 | """This figures out what to do with the argspec and puts it nicely into | |
| 696 | 698 | the list window. It returns the number of lines used to display the | |
| 697 | 699 | argspec. It's also kind of messy due to it having to call so many | |
@@ -700,15 +702,13 @@ def mkargspec(self, topline, down): | |||
| 700 | 702 | ||
| 701 | 703 | r = 3 | |
| 702 | 704 | fn = topline.func | |
| 703 | - args = topline.arginfo.args | ||
| 704 | - kwargs = topline.arginfo.defaults | ||
| 705 | - _args = topline.arginfo.varargs | ||
| 706 | - _kwargs = topline.arginfo.varkwargs | ||
| 705 | + args = topline.argspec.args | ||
| 706 | + kwargs = topline.argspec.defaults | ||
| 707 | + _args = topline.argspec.varargs | ||
| 708 | + _kwargs = topline.argspec.varkwargs | ||
| 707 | 709 | is_bound_method = topline.is_bound_method | |
| 708 | - in_arg = topline.in_arg | ||
| 709 | - print "\n\nprinting topline",topline | ||
| 710 | 710 | if py3: | |
| 711 | - kwonly = topline.arginfo.kwonly | ||
| 711 | + kwonly = topline.argspec.kwonly | ||
| 712 | 712 | kwonly_defaults = topline.kwonly_defaults or dict() | |
| 713 | 713 | max_w = int(self.scr.getmaxyx()[1] * 0.6) | |
| 714 | 714 | self.list_win.erase() | |
@@ -1254,7 +1254,7 @@ def write(self, s): | |||
| 1254 | 1254 | self.s_hist.append(s.rstrip()) | |
| 1255 | 1255 | ||
| 1256 | 1256 | ||
| 1257 | - def show_list(self, items, topline=None, formatter=None, current_item=None): | ||
| 1257 | + def show_list(self, items, arg_pos, topline=None, formatter=None, current_item=None): | ||
| 1258 | 1258 | ||
| 1259 | 1259 | shared = Struct() | |
| 1260 | 1260 | shared.cols = 0 | |
@@ -1276,7 +1276,7 @@ def show_list(self, items, topline=None, formatter=None, current_item=None): | |||
| 1276 | 1276 | current_item = formatter(current_item) | |
| 1277 | 1277 | ||
| 1278 | 1278 | if topline: | |
| 1279 | - height_offset = self.mkargspec(topline, down) + 1 | ||
| 1279 | + height_offset = self.mkargspec(topline, arg_pos, down) + 1 | ||
| 1280 | 1280 | else: | |
| 1281 | 1281 | height_offset = 0 | |
| 1282 | 1282 | ||
@@ -1455,7 +1455,8 @@ def tab(self, back=False): | |||
| 1455 | 1455 | current_match = back and self.matches_iter.previous() \ | |
| 1456 | 1456 | or next(self.matches_iter) | |
| 1457 | 1457 | try: | |
| 1458 | - self.show_list(self.matches_iter.matches, topline=self.funcprops, | ||
| 1458 | + self.show_list(self.matches_iter.matches, self.arg_pos, | ||
| 1459 | + topline=self.funcprops, | ||
| 1459 | 1460 | formatter=self.matches_iter.completer.format, | |
| 1460 | 1461 | current_item=current_match) | |
| 1461 | 1462 | except curses.error: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments