updatd console-clear to use parentw

--HG--
branch : pmacs2
This commit is contained in:
Erik Osheim 2009-07-12 14:55:22 -04:00
parent 3512296eb8
commit e8bb97f4ea
1 changed files with 6 additions and 5 deletions

View File

@ -93,11 +93,12 @@ class ConsoleCancel(Method):
w.application.close_completion_buffer()
class ConsoleClear(Method):
def execute(self, w, **vargs):
a = w.application
if not a.has_buffer_name('*Console*'):
raise Exception, "No console found!"
b = a.bufferlist.get_buffer_by_name('*Console*')
b.clear()
#a = w.application
#if not a.has_buffer_name('*Console*'):
# raise Exception, "No console found!"
#b = a.bufferlist.get_buffer_by_name('*Console*')
#b.clear()
w.buffer.parentw.buffer.clear()
class ConsoleHistoryPrev(Method):
def execute(self, w, **vargs):