fixed possble giant error bug

--HG--
branch : pmacs2
This commit is contained in:
moculus 2008-04-28 06:46:14 +00:00
parent 06deff46c3
commit 4d94c4ce5d
1 changed files with 6 additions and 1 deletions

View File

@ -27,6 +27,8 @@ def run_app(stdscr, buffers, jump_to_line=None, init_mode=None):
a = Application(stdscr, buffers, jump_to_line, init_mode)
a.run()
MAX_ERROR_DISPLAY = 128
KILL_RING_LIMIT = 128
WORD_LETTERS = list(string.letters + string.digits)
ERROR_TIMEOUT = -1
@ -779,7 +781,10 @@ class Application(object):
def get_minibuffer_lines(self):
lines, lines2 = [], []
if self.error_string:
s = self.error_string
if len(self.error_string) < MAX_ERROR_DISPLAY:
s = self.error_string
else:
s = self.error_string[:MAX_ERROR_DISPLAY] + '...'
elif self.mini_buffer_is_open():
s = self.mini_prompt + self.mini_buffer.lines[0]
lines2 = self.mini_buffer.lines[1:]