self now highlighted differently in arg list

This commit is contained in:
Bob Farrell
2008-12-15 19:12:32 +00:00
parent e4ecd23f0d
commit 196eeb8e79
2 changed files with 8 additions and 1 deletions
+2
View File
@@ -4,6 +4,8 @@ Menno sent me some patches to fix some stuff:
* Socket error handled when submitting to a pastebin.
* Resizing could crash if you resize small enough.
'self' in arg list is now highlighted a different colour.
v0.7.1
======
Added support for a history file, defaults to ~/.pythonhist and 100 lines but
+6 -1
View File
@@ -654,8 +654,13 @@ class Repl(object):
r += 1
self.list_win.addstr('\n\t')
if str(i) == 'self' and k == 0:
color = self._C["r"]
else:
color = self._C["g"]
self.list_win.addstr(str(i),
curses.color_pair(self._C["g"]+1) | curses.A_BOLD)
curses.color_pair(color + 1) | curses.A_BOLD)
if kw:
self.list_win.addstr('=', curses.color_pair(self._C["c"]+1))
self.list_win.addstr(kw, curses.color_pair(self._C["g"]+1))