Skip to content

Commit c427c71

Browse files
susinmotionthomasballinger
authored andcommitted
shows error message. However, jumps up 2 lines when rewind is pressed the first time. Also does something weird when you try to rewind past the error message
1 parent a8136bb commit c427c71

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

bpython/curtsiesfrontend/repl.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,13 +1257,17 @@ def reevaluate(self, insert_into_history=False):
12571257
sys.stdin = self.stdin
12581258
self.reevaluating = False
12591259
num_lines_onscreen=len(self.lines_for_display)-max(0, self.scroll_offset)
1260+
old_display_lines_offscreen=[]
1261+
display_lines_offscreen=[]
1262+
12601263
if old_display_lines[:len(self.display_lines)-num_lines_onscreen]!=self.display_lines:
1261-
old_display_lines_offscreen=old_display_lines[:len(self.display_lines)-num_lines_onscreen]
1262-
display_lines_offscreen=self.display_lines[:-num_lines_onscreen]
1263-
1264+
old_display_lines_offscreen=old_display_lines[:len(self.display_lines)-num_lines_onscreen]
1265+
display_lines_offscreen=self.display_lines[:-num_lines_onscreen]
1266+
12641267
if old_display_lines_offscreen!=display_lines_offscreen:
12651268
self.inconsistent_history = True
12661269
self.scroll_offset=self.scroll_offset-max(-1,(len(old_display_lines_offscreen)-len(display_lines_offscreen)+1))
1270+
12671271
self.cursor_offset = 0
12681272
self.current_line = ''
12691273

0 commit comments

Comments
 (0)