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() w.application.close_completion_buffer()
class ConsoleClear(Method): class ConsoleClear(Method):
def execute(self, w, **vargs): def execute(self, w, **vargs):
a = w.application #a = w.application
if not a.has_buffer_name('*Console*'): #if not a.has_buffer_name('*Console*'):
raise Exception, "No console found!" # raise Exception, "No console found!"
b = a.bufferlist.get_buffer_by_name('*Console*') #b = a.bufferlist.get_buffer_by_name('*Console*')
b.clear() #b.clear()
w.buffer.parentw.buffer.clear()
class ConsoleHistoryPrev(Method): class ConsoleHistoryPrev(Method):
def execute(self, w, **vargs): def execute(self, w, **vargs):