[gitg/wip/patch-stage: 1/11] Added line offset and length information in diff
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/wip/patch-stage: 1/11] Added line offset and length information in diff
- Date: Tue, 31 Dec 2013 14:19:26 +0000 (UTC)
commit e7d5312ca851a67d12a96b49ece4cd9c4f82815f
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Fri Dec 27 18:03:39 2013 +0100
Added line offset and length information in diff
libgitg/gitg-diff-view-request-diff.vala | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libgitg/gitg-diff-view-request-diff.vala b/libgitg/gitg-diff-view-request-diff.vala
index 37fa2dd..1c6ab7f 100644
--- a/libgitg/gitg-diff-view-request-diff.vala
+++ b/libgitg/gitg-diff-view-request-diff.vala
@@ -171,8 +171,12 @@ namespace Gitg
{
builder.begin_object();
{
- builder.set_member_name("type").add_int_value((int)line.get_origin());
+ var content = line.get_content();
+
+ builder.set_member_name("type").add_int_value((int64)line.get_origin());
builder.set_member_name("content").add_string_value(line.get_text());
+
builder.set_member_name("offset").add_int_value((int64)line.get_content_offset());
+ builder.set_member_name("length").add_int_value((int64)content.length);
}
builder.end_object();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]