Skip to content

Commit 26528b3

Browse files
committed
self now highlighted differently in arg list
committer: Bob Farrell <robertanthonyfarrell@gmail.com>
1 parent 236a504 commit 26528b3

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

‎CHANGELOG‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Menno sent me some patches to fix some stuff:
44
* Socket error handled when submitting to a pastebin.
55
* Resizing could crash if you resize small enough.
66

7+
'self' in arg list is now highlighted a different colour.
8+
79
v0.7.1
810
======
911
Added support for a history file, defaults to ~/.pythonhist and 100 lines but

‎bpython/cli.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,8 +654,13 @@ def mkargspec(self, topline, down):
654654
r += 1
655655
self.list_win.addstr('\n\t')
656656

657+
if str(i) == 'self' and k == 0:
658+
color = self._C["r"]
659+
else:
660+
color = self._C["g"]
661+
657662
self.list_win.addstr(str(i),
658-
curses.color_pair(self._C["g"]+1) | curses.A_BOLD)
663+
curses.color_pair(color + 1) | curses.A_BOLD)
659664
if kw:
660665
self.list_win.addstr('=', curses.color_pair(self._C["c"]+1))
661666
self.list_win.addstr(kw, curses.color_pair(self._C["g"]+1))

0 commit comments

Comments
 (0)