[PATCH v2] filediff: Display visual column offset in status bar
- From: Simon Marchi <simon marchi polymtl ca>
- To: meld-list gnome org
- Cc: Simon Marchi <simon marchi polymtl ca>
- Subject: [PATCH v2] filediff: Display visual column offset in status bar
- Date: Tue, 11 Apr 2017 22:02:24 -0400
This patch changes the filediff so that the offset shown in the status
bar is the visual column offset, rather than the byte offset in the
current line.
---
meld/filediff.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meld/filediff.py b/meld/filediff.py
index 12a5678c..fbafaec6 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -320,7 +320,7 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
self.cursor.pane, self.cursor.pos = pane, pos
cursor_it = buf.get_iter_at_offset(pos)
- offset = cursor_it.get_line_offset()
+ offset = self.textview[pane].get_visual_column(cursor_it)
line = cursor_it.get_line()
insert_overwrite = self._insert_overwrite_text[self.textview_overwrite]
--
2.12.2
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]