init log earlier to catch more errors

--HG--
branch : pmacs2
This commit is contained in:
Erik Osheim 2009-06-09 11:00:41 -04:00
parent 4f52a89a22
commit 7088647a3f
1 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,9 @@ class Application(object):
self.stdscr = stdscr self.stdscr = stdscr
self.y, self.x = self.stdscr.getmaxyx() self.y, self.x = self.stdscr.getmaxyx()
# we have to do this early so we can log errors
self.log = buffer.LogBuffer()
# initialize some basic stuff # initialize some basic stuff
self.config = {} self.config = {}
self.highlighted_ranges = [] self.highlighted_ranges = []
@ -146,7 +149,6 @@ class Application(object):
# initialize our buffers # initialize our buffers
# note that only the first buffer will be initially visible # note that only the first buffer will be initially visible
buffers.append(buffer.about.AboutBuffer()) buffers.append(buffer.about.AboutBuffer())
self.log = buffer.LogBuffer()
buffers.append(self.log) buffers.append(self.log)
if self.rcerror: if self.rcerror:
buffers.insert(0, buffer.data.DataBuffer('*RcError*', self.rcerror)) buffers.insert(0, buffer.data.DataBuffer('*RcError*', self.rcerror))