[gedit-code-assistance] Added helper to get iters from a source range



commit 9eaa6fdd8e866a3bf12eee116e8a0699258b3761
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date:   Sun Nov 13 19:09:57 2011 +0100

    Added helper to get iters from a source range

 src/gcp-source-range.vala |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/gcp-source-range.vala b/src/gcp-source-range.vala
index b23c492..cb1cc14 100644
--- a/src/gcp-source-range.vala
+++ b/src/gcp-source-range.vala
@@ -63,6 +63,14 @@ class SourceRange : Object, SourceRangeSupport
 		return other.d_end.compare_to(d_end);
 	}
 
+	public bool get_iters(Gtk.TextBuffer buffer,
+	                      out Gtk.TextIter start,
+	                      out Gtk.TextIter end)
+	{
+		return d_start.get_iter(buffer, out start) &&
+		       d_end.get_iter(buffer, out end);
+	}
+
 	public bool contains_range(SourceRange range)
 	{
 		return contains_location(range.start) && contains_location(range.end);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]