From 6a975d9a2e9dbade53985fcb3af6fe3bb039fc40 Mon Sep 17 00:00:00 2001 From: moculus Date: Tue, 10 Mar 2009 14:43:04 +0000 Subject: [PATCH] --HG-- branch : pmacs2 --- buffer/console.py | 15 ++++++++------- mode/consolemini.py | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/buffer/console.py b/buffer/console.py index 4301ecd..50241e6 100644 --- a/buffer/console.py +++ b/buffer/console.py @@ -3,14 +3,13 @@ from buffer.color import ColorDataBuffer # console is another singleton console = None -class ConsoleBuffer(ColorDataBuffer): +class ConsoleBuffer(Buffer): btype = 'console' - #modename = 'ipython' - modename = 'colortext' + modename = 'ipython' bannerlines = [ - '[r:d:*]# Python Console\n', - "[r:d:*]# Evaluate python expressions in the editor's context (self)\n", - '[r:d:*]# Press Control-] to exit\n', + '# Python Console\n', + "# Evaluate python expressions in the editor's context (self)\n", + '# Press Control-] to exit\n', ] banner = ''.join(bannerlines) def __new__(cls, *args, **kwargs): @@ -19,8 +18,10 @@ class ConsoleBuffer(ColorDataBuffer): b = object.__new__(ConsoleBuffer, *args, **kwargs) console = b return console + def __init__(self): + Buffer.__init__(self) + self.set_data(self.banner, force=True) - def __init__(self): ColorDataBuffer.__init__(self, '*Console*', self.banner) def clear(self): console.set_data(self.banner, force=True) def name(self): return '*Console*' def changed(self): return False diff --git a/mode/consolemini.py b/mode/consolemini.py index a9b4458..7d5e790 100644 --- a/mode/consolemini.py +++ b/mode/consolemini.py @@ -23,7 +23,7 @@ class ConsoleExec(method.Method): if a.window().buffer is not b: a.switch_buffer(b) p = a.get_mini_buffer_prompt() - b.insert_string(b.get_buffer_end(), '[c:d:*]' + p + '[d:d]' + s + '\n', force=True) + b.insert_string(b.get_buffer_end(), p + s + '\n', force=True) if w.mode.saved_input: s = w.mode.saved_input + '\n' + s