[gitg] Fix offset from parsing tags
- From: Alberto Fanjul <albfan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Fix offset from parsing tags
- Date: Sat, 22 Jan 2022 12:48:59 +0000 (UTC)
commit 2ba2cf8b683cb9de36bc47e4055bf3896d9c1c25
Author: Alberto Fanjul <albertofanjul gmail com>
Date: Sat Jan 22 13:47:01 2022 +0100
Fix offset from parsing tags
libgitg/gitg-diff-view.vala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libgitg/gitg-diff-view.vala b/libgitg/gitg-diff-view.vala
index da37d05d..00b125ed 100644
--- a/libgitg/gitg-diff-view.vala
+++ b/libgitg/gitg-diff-view.vala
@@ -322,8 +322,8 @@ public class Gitg.DiffView : Gtk.Grid
int start_pos, end_pos;
string text = matchInfo.fetch(0);
matchInfo.fetch_pos (0, out start_pos, out end_pos);
- buffer.get_iter_at_offset(out start, start_pos);
- buffer.get_iter_at_offset(out end, end_pos);
+ buffer.get_iter_at_offset(out start, start_pos -1);
+ buffer.get_iter_at_offset(out end, end_pos -1);
var tag = buffer.create_tag(null, "underline", Pango.Underline.SINGLE);
tag.foreground_rgba = custom_color_link;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]