From 5f92ca8f399d7071ec723827dc8a066622e842bb Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Sat, 17 Nov 2007 19:00:20 -0500 Subject: [PATCH] Fix bug when merging lines across a ResultChunk --- lib/reinteract/shell_buffer.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/reinteract/shell_buffer.py b/lib/reinteract/shell_buffer.py index 96dab87..9e61b5e 100755 --- a/lib/reinteract/shell_buffer.py +++ b/lib/reinteract/shell_buffer.py @@ -828,8 +828,8 @@ class ShellBuffer(gtk.TextBuffer, Worksheet): return end.backward_line() - if not new_end.ends_line(): - new_end.forward_to_line_end() + if not end.ends_line(): + end.forward_to_line_end() end_line -= 1 if start.starts_line() and end.starts_line(): @@ -1396,6 +1396,13 @@ if __name__ == '__main__': insert(2, 0, "\n") expect([S(0,0), R(1,1), B(2,2), S(3,3), R(4,4), S(5,5), R(6,6), B(7,7)]) + # Test deleting a range including a result and joining two statements + clear() + insert(0, 0, "12\n34") + buffer.calculate() + delete(0, 1, 2, 1) + expect_text("14") + # Undo tests clear() -- 2.11.4.GIT