fixed bug/performance on netbsd

--HG--
branch : pmacs2
This commit is contained in:
moculus 2007-08-12 22:07:54 +00:00
parent ed33e7739a
commit 108ebbfef1
1 changed files with 6 additions and 8 deletions

View File

@ -219,11 +219,10 @@ class Application(object):
self.win = curses.newwin(self.y, self.x, 0, 0)
self.win.leaveok(0)
curses.meta(1)
curses.nocbreak()
curses.cbreak()
#curses.halfdelay(5)
curses.noecho()
curses.nonl()
curses.noraw()
curses.halfdelay(1)
def globals(self):
return globals()
@ -498,7 +497,7 @@ class Application(object):
# full screen drawer
def draw(self):
try:
self.draw_slots()
self.draw_slots() #XYZ
self.draw_input_bar()
self.draw_cursor()
self.win.noutrefresh()
@ -725,16 +724,15 @@ class Application(object):
else:
perc = "%2d%%" % (first.y*100 / len(b.lines))
# XYZ: we should actually use more of the 'state' variables
format = "%s %-18s (%s)--L%d--C%d--%s"
status = format % (modflag, name, w.mode.name(), cursor.y+1, cursor.x+1, perc)
#format = "%s %-18s (%s)--L%d--C%d--%s %s %s %s"
#status = format % (modflag, name, w.mode.name(), cursor.y+1, cursor.x+1, perc, w.first, cursor, w.last)
status = status[:slot.width + 1]
status += "-" * (slot.width - len(status) + 1)
self.win.addnstr(slot.height + slot.offset, 0, status, slot.width + 1,
curses.A_REVERSE)
status = status.ljust(slot.width + 1)[:slot.width + 1]
self.win.addstr(slot.height + slot.offset, 0, status, curses.A_REVERSE)
# input bar drawing
def draw_input_bar(self):