diff -rc meld-3.14.1.orig/meld/filediff.py meld-3.14.1/meld/filediff.py *** meld-3.14.1.orig/meld/filediff.py Sat Oct 3 22:43:35 2015 --- meld-3.14.1/meld/filediff.py Tue Nov 10 16:21:49 2015 *************** *** 542,548 **** # Warp the cursor to the first line of the chunk buf = self.textbuffer[pane] if self.cursor.line != chunk[1]: ! buf.place_cursor(buf.get_iter_at_line(chunk[1])) tolerance = 0.0 if centered else 0.2 self.textview[pane].scroll_to_mark( --- 542,548 ---- # Warp the cursor to the first line of the chunk buf = self.textbuffer[pane] if self.cursor.line != chunk[1]: ! buf.place_cursor((buf.get_iter_at_line(chunk[1]))[1]) tolerance = 0.0 if centered else 0.2 self.textview[pane].scroll_to_mark( *************** *** 756,762 **** new_buf = self.textbuffer[new_pane] self.textview[new_pane].grab_focus() ! new_buf.place_cursor(new_buf.get_iter_at_line(new_line)) self.textview[new_pane].scroll_to_mark( new_buf.get_insert(), 0.1, True, 0.5, 0.5) --- 756,762 ---- new_buf = self.textbuffer[new_pane] self.textview[new_pane].grab_focus() ! new_buf.place_cursor((new_buf.get_iter_at_line(new_line))[1]) self.textview[new_pane].scroll_to_mark( new_buf.get_insert(), 0.1, True, 0.5, 0.5) *************** *** 1584,1590 **** if (self.props.highlight_current_line and textview.is_focus() and self.cursor.line is not None): ! it = textbuffer.get_iter_at_line(self.cursor.line) ypos, line_height = textview.get_line_yrange(it) context.save() context.rectangle(0, ypos - visible.y, width, line_height) --- 1584,1590 ---- if (self.props.highlight_current_line and textview.is_focus() and self.cursor.line is not None): ! it = (textbuffer.get_iter_at_line(self.cursor.line))[1] ypos, line_height = textview.get_line_yrange(it) context.save() context.rectangle(0, ypos - visible.y, width, line_height) *************** *** 1944,1950 **** obegin = c[4] fraction = (line - mbegin) / ((mend - mbegin) or 1) other_line = (obegin + fraction * (oend - obegin)) ! it = self.textbuffer[i].get_iter_at_line(int(other_line)) val, height = self.textview[i].get_line_yrange(it) val -= (adj.get_page_size()) * syncpoint val += (other_line-int(other_line)) * height --- 1944,1950 ---- obegin = c[4] fraction = (line - mbegin) / ((mend - mbegin) or 1) other_line = (obegin + fraction * (oend - obegin)) ! it = (self.textbuffer[i].get_iter_at_line(int(other_line)))[1] val, height = self.textview[i].get_line_yrange(it) val -= (adj.get_page_size()) * syncpoint val += (other_line-int(other_line)) * height *************** *** 1987,1997 **** y, h = get_line_yrange(get_end_iter()) max_y = float(y + h) for c in self.linediffer.single_changes(i): ! y0, _ = get_line_yrange(get_iter_at_line(c[1])) if c[1] == c[2]: y, h = y0, 0 else: ! y, h = get_line_yrange(get_iter_at_line(c[2] - 1)) yield c[0], y0 / max_y, (y + h) / max_y return coords_by_chunk --- 1987,1997 ---- y, h = get_line_yrange(get_end_iter()) max_y = float(y + h) for c in self.linediffer.single_changes(i): ! y0, _ = get_line_yrange((get_iter_at_line(c[1]))[1]) if c[1] == c[2]: y, h = y0, 0 else: ! y, h = get_line_yrange((get_iter_at_line(c[2] - 1))[1]) yield c[0], y0 / max_y, (y + h) / max_y return coords_by_chunk diff -rc meld-3.14.1.orig/meld/meldbuffer.py meld-3.14.1/meld/meldbuffer.py *** meld-3.14.1.orig/meld/meldbuffer.py Sat Oct 3 04:10:11 2015 --- meld-3.14.1/meld/meldbuffer.py Tue Nov 10 16:17:54 2015 *************** *** 86,92 **** """ if line >= self.get_line_count(): return self.get_end_iter() ! return self.get_iter_at_line(line) def insert_at_line(self, line, text): """Insert text at the given line, or the end of the buffer. --- 86,92 ---- """ if line >= self.get_line_count(): return self.get_end_iter() ! return (self.get_iter_at_line(line))[1] def insert_at_line(self, line, text): """Insert text at the given line, or the end of the buffer. diff -rc meld-3.14.1.orig/meld/sourceview.py meld-3.14.1/meld/sourceview.py *** meld-3.14.1.orig/meld/sourceview.py Sat Oct 3 22:43:35 2015 --- meld-3.14.1/meld/sourceview.py Tue Nov 10 16:18:12 2015 *************** *** 88,94 **** def get_y_for_line_num(self, line): buf = self.get_buffer() ! it = buf.get_iter_at_line(line) y, h = self.get_line_yrange(it) if line >= buf.get_line_count(): return y + h - 1 --- 88,94 ---- def get_y_for_line_num(self, line): buf = self.get_buffer() ! it = (buf.get_iter_at_line(line))[1] y, h = self.get_line_yrange(it) if line >= buf.get_line_count(): return y + h - 1