[gnome-builder] todo: fragment links are 0-indexed
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] todo: fragment links are 0-indexed
- Date: Sat, 26 Dec 2015 05:01:27 +0000 (UTC)
commit ce7c610d4d2a9717ce2efae6b514be33d114ed64
Author: Christian Hergert <chergert redhat com>
Date: Fri Dec 25 05:44:39 2015 -0800
todo: fragment links are 0-indexed
plugins/todo/todo_plugin/__init__.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/todo/todo_plugin/__init__.py b/plugins/todo/todo_plugin/__init__.py
index 2d890af..f091e41 100644
--- a/plugins/todo/todo_plugin/__init__.py
+++ b/plugins/todo/todo_plugin/__init__.py
@@ -218,7 +218,7 @@ class TodoPanel(Gtk.Bin):
iter = self.model.get_iter(path)
item, = self.model.get(iter, 0)
uri = Ide.Uri.new_from_file(item.props.file)
- uri.set_fragment('L%u' % item.props.line)
+ uri.set_fragment('L%u' % max(1, item.props.line - 1))
workbench = self.get_ancestor(Ide.Workbench)
workbench.open_uri_async(uri, 'editor', None, None, None)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]