branch : pmacs2
This commit is contained in:
moculus 2007-09-26 15:56:07 +00:00
parent 025d142a3d
commit bd202de7bc
2 changed files with 23 additions and 15 deletions

1
BUGS
View File

@ -21,6 +21,7 @@ to see anything).
sometimes searching seems to save the wrong cursor position, or not overwrite
the previously used one, and you end up finding matches *before* your search
started.
* possibly fixed (2007/09/26)
2006/07/04:
undo/redo is mostly fixed, but there are still occasionally problems, which seem

View File

@ -496,7 +496,7 @@ class Application(object):
# full screen drawer
def draw(self, err=""):
try:
self.draw_slots() #XYZ
self.draw_slots()
self.draw_input_bar()
self.draw_cursor()
self.win.noutrefresh()
@ -754,24 +754,32 @@ class Application(object):
self.win.addch(self.y-1, self.x-1, ' ')
except:
pass
def _get_mini_lines(self, s):
i = self.x - 1
return [s[:i]]
lines = [s[:i]]
while i < len(s):
lines.append(s[i:self.x - 1 + i])
i += self.x - 1
return lines
def draw_error(self):
l = self.x - 1
s1 = self.error_string
s2 = util.cleanse(util.padtrunc(s1, l))
#self.win.addnstr(self.y-1, 0, s2, l)
self.win.addstr(self.y-1, 0, s2)
lines = self._get_mini_lines(self.error_string)
for i in range(0, len(lines)):
line = util.pad(lines[i], self.x - 1)
self.win.addstr(self.y - len(lines) + i, 0, line)
def draw_mini_buffer(self):
l = self.x - 1
b = self.mini_buffer
s1 = self.mini_prompt + b.lines[0]
s2 = util.padtrunc(s1, l)
#self.win.addnstr(self.y-1, 0, s2, l)
self.win.addstr(self.y-1, 0, s2)
lines = self._get_mini_lines(self.mini_prompt + b.lines[0])
for i in range(0, len(lines)):
line = util.pad(lines[i], self.x - 1)
self.win.addstr(self.y - len(lines) + i, 0, line)
def draw_nothing(self):
l = self.x - 1
#self.win.addnstr(self.y-1, 0, util.pad('', l), l)
self.win.addstr(self.y-1, 0, util.pad('', l))
self.win.addstr(self.y-1, 0, util.pad('', self.x - 1))
def open_aes_file(path, nl, name=None):
if os.path.isfile(path) or not os.path.exists(path):
@ -864,4 +872,3 @@ if __name__ == "__main__":
# ok, now run our app
run(buffers, opts.goto, opts.mode)