diff --git a/application.py b/application.py index 3160040..6f0de4e 100755 --- a/application.py +++ b/application.py @@ -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:]