/* gitg-diff-view-file-selectable.c generated by valac 0.32.1, the Vala compiler
 * generated from gitg-diff-view-file-selectable.vala, do not modify */

/*
 * This file is part of gitg
 *
 * Copyright (C) 2015 - Jesse van den Kieboom
 *
 * gitg is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * gitg is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with gitg. If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gee.h>
#include <gdk/gdk.h>
#include <gtksourceview/gtksource.h>


#define GITG_TYPE_DIFF_SELECTION_MODE (gitg_diff_selection_mode_get_type ())

#define GITG_TYPE_DIFF_VIEW_FILE_SELECTABLE (gitg_diff_view_file_selectable_get_type ())
#define GITG_DIFF_VIEW_FILE_SELECTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_DIFF_VIEW_FILE_SELECTABLE, GitgDiffViewFileSelectable))
#define GITG_DIFF_VIEW_FILE_SELECTABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_DIFF_VIEW_FILE_SELECTABLE, GitgDiffViewFileSelectableClass))
#define GITG_IS_DIFF_VIEW_FILE_SELECTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_DIFF_VIEW_FILE_SELECTABLE))
#define GITG_IS_DIFF_VIEW_FILE_SELECTABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_DIFF_VIEW_FILE_SELECTABLE))
#define GITG_DIFF_VIEW_FILE_SELECTABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_DIFF_VIEW_FILE_SELECTABLE, GitgDiffViewFileSelectableClass))

typedef struct _GitgDiffViewFileSelectable GitgDiffViewFileSelectable;
typedef struct _GitgDiffViewFileSelectableClass GitgDiffViewFileSelectableClass;
typedef struct _GitgDiffViewFileSelectablePrivate GitgDiffViewFileSelectablePrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_slist_free0(var) ((var == NULL) ? NULL : (var = (g_slist_free (var), NULL)))

typedef enum  {
	GITG_DIFF_SELECTION_MODE_NONE,
	GITG_DIFF_SELECTION_MODE_SELECTING,
	GITG_DIFF_SELECTION_MODE_DESELECTING
} GitgDiffSelectionMode;

struct _GitgDiffViewFileSelectable {
	GObject parent_instance;
	GitgDiffViewFileSelectablePrivate * priv;
};

struct _GitgDiffViewFileSelectableClass {
	GObjectClass parent_class;
};

struct _GitgDiffViewFileSelectablePrivate {
	gchar* d_selection_category;
	GtkTextTag* d_selection_tag;
	GitgDiffSelectionMode d_selection_mode;
	GtkTextMark* d_start_selection_mark;
	GtkTextMark* d_end_selection_mark;
	GeeHashMap* d_originally_selected;
	GdkCursor* d_cursor_ptr;
	GdkCursor* d_cursor_hand;
	gboolean d_is_rubber_band;
	GtkSourceView* _source_view;
	gboolean _has_selection;
};


static gpointer gitg_diff_view_file_selectable_parent_class = NULL;

GType gitg_diff_selection_mode_get_type (void) G_GNUC_CONST;
GType gitg_diff_view_file_selectable_get_type (void) G_GNUC_CONST;
#define GITG_DIFF_VIEW_FILE_SELECTABLE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GITG_TYPE_DIFF_VIEW_FILE_SELECTABLE, GitgDiffViewFileSelectablePrivate))
enum  {
	GITG_DIFF_VIEW_FILE_SELECTABLE_DUMMY_PROPERTY,
	GITG_DIFF_VIEW_FILE_SELECTABLE_SOURCE_VIEW,
	GITG_DIFF_VIEW_FILE_SELECTABLE_HAS_SELECTION
};
GitgDiffViewFileSelectable* gitg_diff_view_file_selectable_new (GtkSourceView* source_view);
GitgDiffViewFileSelectable* gitg_diff_view_file_selectable_construct (GType object_type, GtkSourceView* source_view);
static void gitg_diff_view_file_selectable_update_cursor (GitgDiffViewFileSelectable* self, GdkCursor* cursor);
GtkSourceView* gitg_diff_view_file_selectable_get_source_view (GitgDiffViewFileSelectable* self);
static void gitg_diff_view_file_selectable_update_theme (GitgDiffViewFileSelectable* self);
static gboolean gitg_diff_view_file_selectable_get_line_selected (GitgDiffViewFileSelectable* self, GtkTextIter* iter);
static gboolean gitg_diff_view_file_selectable_get_line_is_diff (GitgDiffViewFileSelectable* self, GtkTextIter* iter);
static gboolean gitg_diff_view_file_selectable_get_line_is_hunk (GitgDiffViewFileSelectable* self, GtkTextIter* iter);
static gboolean gitg_diff_view_file_selectable_get_iter_from_pointer_position (GitgDiffViewFileSelectable* self, GtkTextIter* iter);
static gboolean gitg_diff_view_file_selectable_get_iter_from_event_position (GitgDiffViewFileSelectable* self, GtkTextIter* iter, gint x, gint y);
static void gitg_diff_view_file_selectable_update_selection_range (GitgDiffViewFileSelectable* self, GtkTextIter* start, GtkTextIter* end, gboolean select);
static void gitg_diff_view_file_selectable_clear_original_selection (GitgDiffViewFileSelectable* self, GtkTextIter* start, GtkTextIter* end, gboolean include_end);
static void gitg_diff_view_file_selectable_forward_to_hunk_end (GitgDiffViewFileSelectable* self, GtkTextIter* iter);
static gboolean gitg_diff_view_file_selectable_hunk_is_all_selected (GitgDiffViewFileSelectable* self, GtkTextIter* iter);
static void gitg_diff_view_file_selectable_update_selection_hunk (GitgDiffViewFileSelectable* self, GtkTextIter* iter, gboolean select);
static gboolean gitg_diff_view_file_selectable_button_press_event_on_view (GitgDiffViewFileSelectable* self, GdkEventButton* event);
static void gitg_diff_view_file_selectable_update_selection (GitgDiffViewFileSelectable* self, GtkTextIter* cursor);
static gboolean gitg_diff_view_file_selectable_update_selection_event (GitgDiffViewFileSelectable* self, GdkModifierType state, gint x, gint y);
static GdkCursor* gitg_diff_view_file_selectable_get_cursor_hand (GitgDiffViewFileSelectable* self);
static GdkCursor* gitg_diff_view_file_selectable_get_cursor_ptr (GitgDiffViewFileSelectable* self);
static gboolean gitg_diff_view_file_selectable_motion_notify_event_on_view (GitgDiffViewFileSelectable* self, GdkEventMotion* event);
static gboolean gitg_diff_view_file_selectable_leave_notify_event_on_view (GitgDiffViewFileSelectable* self, GdkEventCrossing* event);
static gboolean gitg_diff_view_file_selectable_enter_notify_event_on_view (GitgDiffViewFileSelectable* self, GdkEventCrossing* event);
static void gitg_diff_view_file_selectable_update_has_selection (GitgDiffViewFileSelectable* self);
gboolean gitg_diff_view_file_selectable_get_has_selection (GitgDiffViewFileSelectable* self);
static void gitg_diff_view_file_selectable_set_has_selection (GitgDiffViewFileSelectable* self, gboolean value);
static gboolean gitg_diff_view_file_selectable_button_release_event_on_view (GitgDiffViewFileSelectable* self, GdkEventButton* event);
void gitg_diff_view_file_selectable_set_source_view (GitgDiffViewFileSelectable* self, GtkSourceView* value);
gint* gitg_diff_view_file_selectable_get_selected_lines (GitgDiffViewFileSelectable* self, int* result_length1);
static void _vala_array_add3 (gint** array, int* length, int* size, gint value);
static GObject * gitg_diff_view_file_selectable_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static gboolean _gitg_diff_view_file_selectable_button_press_event_on_view_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
static gboolean _gitg_diff_view_file_selectable_motion_notify_event_on_view_gtk_widget_motion_notify_event (GtkWidget* _sender, GdkEventMotion* event, gpointer self);
static gboolean _gitg_diff_view_file_selectable_leave_notify_event_on_view_gtk_widget_leave_notify_event (GtkWidget* _sender, GdkEventCrossing* event, gpointer self);
static gboolean _gitg_diff_view_file_selectable_enter_notify_event_on_view_gtk_widget_enter_notify_event (GtkWidget* _sender, GdkEventCrossing* event, gpointer self);
static gboolean _gitg_diff_view_file_selectable_button_release_event_on_view_gtk_widget_button_release_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
static void _gitg_diff_view_file_selectable___lambda49_ (GitgDiffViewFileSelectable* self);
static void __gitg_diff_view_file_selectable___lambda49__gtk_widget_realize (GtkWidget* _sender, gpointer self);
static void _gitg_diff_view_file_selectable___lambda50_ (GitgDiffViewFileSelectable* self);
static void __gitg_diff_view_file_selectable___lambda50__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void _gitg_diff_view_file_selectable_update_theme_gtk_widget_style_updated (GtkWidget* _sender, gpointer self);
static void gitg_diff_view_file_selectable_finalize (GObject* obj);
static void _vala_gitg_diff_view_file_selectable_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_gitg_diff_view_file_selectable_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


GType gitg_diff_selection_mode_get_type (void) {
	static volatile gsize gitg_diff_selection_mode_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_diff_selection_mode_type_id__volatile)) {
		static const GEnumValue values[] = {{GITG_DIFF_SELECTION_MODE_NONE, "GITG_DIFF_SELECTION_MODE_NONE", "none"}, {GITG_DIFF_SELECTION_MODE_SELECTING, "GITG_DIFF_SELECTION_MODE_SELECTING", "selecting"}, {GITG_DIFF_SELECTION_MODE_DESELECTING, "GITG_DIFF_SELECTION_MODE_DESELECTING", "deselecting"}, {0, NULL, NULL}};
		GType gitg_diff_selection_mode_type_id;
		gitg_diff_selection_mode_type_id = g_enum_register_static ("GitgDiffSelectionMode", values);
		g_once_init_leave (&gitg_diff_selection_mode_type_id__volatile, gitg_diff_selection_mode_type_id);
	}
	return gitg_diff_selection_mode_type_id__volatile;
}


GitgDiffViewFileSelectable* gitg_diff_view_file_selectable_construct (GType object_type, GtkSourceView* source_view) {
	GitgDiffViewFileSelectable * self = NULL;
	GtkSourceView* _tmp0_ = NULL;
#line 68 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (source_view != NULL, NULL);
#line 70 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = source_view;
#line 70 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	self = (GitgDiffViewFileSelectable*) g_object_new (object_type, "source-view", _tmp0_, NULL);
#line 68 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return self;
#line 159 "gitg-diff-view-file-selectable.c"
}


GitgDiffViewFileSelectable* gitg_diff_view_file_selectable_new (GtkSourceView* source_view) {
#line 68 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return gitg_diff_view_file_selectable_construct (GITG_TYPE_DIFF_VIEW_FILE_SELECTABLE, source_view);
#line 166 "gitg-diff-view-file-selectable.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 131 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return self ? g_object_ref (self) : NULL;
#line 173 "gitg-diff-view-file-selectable.c"
}


static void gitg_diff_view_file_selectable_update_cursor (GitgDiffViewFileSelectable* self, GdkCursor* cursor) {
	GdkWindow* window = NULL;
	GtkSourceView* _tmp0_ = NULL;
	GdkWindow* _tmp1_ = NULL;
	GdkWindow* _tmp2_ = NULL;
	GdkWindow* _tmp3_ = NULL;
	GdkWindow* _tmp4_ = NULL;
	GdkCursor* _tmp5_ = NULL;
#line 129 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_if_fail (self != NULL);
#line 129 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_if_fail (cursor != NULL);
#line 131 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = self->priv->_source_view;
#line 131 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = gtk_text_view_get_window ((GtkTextView*) _tmp0_, GTK_TEXT_WINDOW_TEXT);
#line 131 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 131 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	window = _tmp2_;
#line 133 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp3_ = window;
#line 133 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp3_ == NULL) {
#line 135 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_g_object_unref0 (window);
#line 135 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		return;
#line 205 "gitg-diff-view-file-selectable.c"
	}
#line 138 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp4_ = window;
#line 138 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp5_ = cursor;
#line 138 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gdk_window_set_cursor (_tmp4_, _tmp5_);
#line 129 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (window);
#line 215 "gitg-diff-view-file-selectable.c"
}


static void gitg_diff_view_file_selectable_update_theme (GitgDiffViewFileSelectable* self) {
	GtkSourceMarkAttributes* selection_attributes = NULL;
	GtkSourceMarkAttributes* _tmp0_ = NULL;
	GtkStyleContext* context = NULL;
	GtkSourceView* _tmp1_ = NULL;
	GtkStyleContext* _tmp2_ = NULL;
	GtkStyleContext* _tmp3_ = NULL;
	GdkRGBA theme_selected_bg_color = {0};
	GdkRGBA theme_selected_fg_color = {0};
	GtkStyleContext* _tmp4_ = NULL;
	GdkRGBA _tmp5_ = {0};
	gboolean _tmp6_ = FALSE;
	GtkStyleContext* _tmp9_ = NULL;
	GdkRGBA _tmp10_ = {0};
	gboolean _tmp11_ = FALSE;
	GtkSourceView* _tmp14_ = NULL;
	const gchar* _tmp15_ = NULL;
	GtkSourceMarkAttributes* _tmp16_ = NULL;
#line 141 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_if_fail (self != NULL);
#line 143 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = gtk_source_mark_attributes_new ();
#line 143 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	selection_attributes = _tmp0_;
#line 144 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = self->priv->_source_view;
#line 144 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp2_ = gtk_widget_get_style_context ((GtkWidget*) _tmp1_);
#line 144 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 144 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	context = _tmp3_;
#line 148 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp4_ = context;
#line 148 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp6_ = gtk_style_context_lookup_color (_tmp4_, "theme_selected_bg_color", &_tmp5_);
#line 148 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	theme_selected_bg_color = _tmp5_;
#line 148 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp6_) {
#line 259 "gitg-diff-view-file-selectable.c"
		GtkSourceMarkAttributes* _tmp7_ = NULL;
		GdkRGBA _tmp8_ = {0};
#line 150 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp7_ = selection_attributes;
#line 150 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp8_ = theme_selected_bg_color;
#line 150 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		g_object_set (_tmp7_, "background", &_tmp8_, NULL);
#line 268 "gitg-diff-view-file-selectable.c"
	}
#line 153 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp9_ = context;
#line 153 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp11_ = gtk_style_context_lookup_color (_tmp9_, "theme_selected_fg_color", &_tmp10_);
#line 153 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	theme_selected_fg_color = _tmp10_;
#line 153 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp11_) {
#line 278 "gitg-diff-view-file-selectable.c"
		GtkTextTag* _tmp12_ = NULL;
		GdkRGBA _tmp13_ = {0};
#line 155 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp12_ = self->priv->d_selection_tag;
#line 155 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp13_ = theme_selected_fg_color;
#line 155 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		g_object_set (_tmp12_, "foreground-rgba", &_tmp13_, NULL);
#line 287 "gitg-diff-view-file-selectable.c"
	}
#line 158 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp14_ = self->priv->_source_view;
#line 158 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp15_ = self->priv->d_selection_category;
#line 158 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp16_ = selection_attributes;
#line 158 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gtk_source_view_set_mark_attributes (_tmp14_, _tmp15_, _tmp16_, 0);
#line 141 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (context);
#line 141 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (selection_attributes);
#line 301 "gitg-diff-view-file-selectable.c"
}


static gboolean gitg_diff_view_file_selectable_get_line_selected (GitgDiffViewFileSelectable* self, GtkTextIter* iter) {
	gboolean result = FALSE;
	GtkTextIter start = {0};
	GtkTextIter _tmp0_ = {0};
	GtkSourceBuffer* buffer = NULL;
	GtkSourceView* _tmp1_ = NULL;
	GtkTextBuffer* _tmp2_ = NULL;
	GtkTextBuffer* _tmp3_ = NULL;
	GtkSourceBuffer* _tmp4_ = NULL;
	GtkTextIter _tmp5_ = {0};
	const gchar* _tmp6_ = NULL;
	GSList* _tmp7_ = NULL;
	GSList* _tmp8_ = NULL;
	gboolean _tmp9_ = FALSE;
#line 161 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 161 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (iter != NULL, FALSE);
#line 163 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = *iter;
#line 163 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	start = _tmp0_;
#line 165 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gtk_text_iter_set_line_offset (&start, 0);
#line 167 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = self->priv->_source_view;
#line 167 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp2_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp1_);
#line 167 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp3_ = _tmp2_;
#line 167 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, gtk_source_buffer_get_type ()) ? ((GtkSourceBuffer*) _tmp3_) : NULL);
#line 167 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	buffer = _tmp4_;
#line 169 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp5_ = start;
#line 169 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp6_ = self->priv->d_selection_category;
#line 169 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp7_ = gtk_source_buffer_get_source_marks_at_iter (buffer, &_tmp5_, _tmp6_);
#line 169 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp8_ = _tmp7_;
#line 169 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp9_ = _tmp8_ != NULL;
#line 169 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_slist_free0 (_tmp8_);
#line 169 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	result = _tmp9_;
#line 169 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (buffer);
#line 169 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 357 "gitg-diff-view-file-selectable.c"
}


static gboolean gitg_diff_view_file_selectable_get_line_is_diff (GitgDiffViewFileSelectable* self, GtkTextIter* iter) {
	gboolean result = FALSE;
	GtkTextIter start = {0};
	GtkTextIter _tmp0_ = {0};
	GtkSourceBuffer* buffer = NULL;
	GtkSourceView* _tmp1_ = NULL;
	GtkTextBuffer* _tmp2_ = NULL;
	GtkTextBuffer* _tmp3_ = NULL;
	GtkSourceBuffer* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	GtkSourceBuffer* _tmp6_ = NULL;
	GtkTextIter _tmp7_ = {0};
	GSList* _tmp8_ = NULL;
	GSList* _tmp9_ = NULL;
	gboolean _tmp10_ = FALSE;
#line 172 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 172 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (iter != NULL, FALSE);
#line 174 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = *iter;
#line 174 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	start = _tmp0_;
#line 176 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gtk_text_iter_set_line_offset (&start, 0);
#line 178 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = self->priv->_source_view;
#line 178 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp2_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp1_);
#line 178 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp3_ = _tmp2_;
#line 178 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, gtk_source_buffer_get_type ()) ? ((GtkSourceBuffer*) _tmp3_) : NULL);
#line 178 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	buffer = _tmp4_;
#line 180 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp6_ = buffer;
#line 180 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp7_ = start;
#line 180 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp8_ = gtk_source_buffer_get_source_marks_at_iter (_tmp6_, &_tmp7_, "added");
#line 180 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp9_ = _tmp8_;
#line 180 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp10_ = _tmp9_ != NULL;
#line 180 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_slist_free0 (_tmp9_);
#line 180 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp10_) {
#line 180 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp5_ = TRUE;
#line 412 "gitg-diff-view-file-selectable.c"
	} else {
		GtkSourceBuffer* _tmp11_ = NULL;
		GtkTextIter _tmp12_ = {0};
		GSList* _tmp13_ = NULL;
		GSList* _tmp14_ = NULL;
#line 181 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp11_ = buffer;
#line 181 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp12_ = start;
#line 181 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp13_ = gtk_source_buffer_get_source_marks_at_iter (_tmp11_, &_tmp12_, "removed");
#line 181 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp14_ = _tmp13_;
#line 181 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp5_ = _tmp14_ != NULL;
#line 181 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_g_slist_free0 (_tmp14_);
#line 430 "gitg-diff-view-file-selectable.c"
	}
#line 180 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	result = _tmp5_;
#line 180 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (buffer);
#line 180 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 438 "gitg-diff-view-file-selectable.c"
}


static gboolean gitg_diff_view_file_selectable_get_line_is_hunk (GitgDiffViewFileSelectable* self, GtkTextIter* iter) {
	gboolean result = FALSE;
	GtkTextIter start = {0};
	GtkTextIter _tmp0_ = {0};
	GtkSourceBuffer* buffer = NULL;
	GtkSourceView* _tmp1_ = NULL;
	GtkTextBuffer* _tmp2_ = NULL;
	GtkTextBuffer* _tmp3_ = NULL;
	GtkSourceBuffer* _tmp4_ = NULL;
	GtkTextIter _tmp5_ = {0};
	GSList* _tmp6_ = NULL;
	GSList* _tmp7_ = NULL;
	gboolean _tmp8_ = FALSE;
#line 184 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 184 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (iter != NULL, FALSE);
#line 186 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = *iter;
#line 186 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	start = _tmp0_;
#line 188 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gtk_text_iter_set_line_offset (&start, 0);
#line 190 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = self->priv->_source_view;
#line 190 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp2_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp1_);
#line 190 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp3_ = _tmp2_;
#line 190 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, gtk_source_buffer_get_type ()) ? ((GtkSourceBuffer*) _tmp3_) : NULL);
#line 190 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	buffer = _tmp4_;
#line 192 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp5_ = start;
#line 192 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp6_ = gtk_source_buffer_get_source_marks_at_iter (buffer, &_tmp5_, "header");
#line 192 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp7_ = _tmp6_;
#line 192 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp8_ = _tmp7_ != NULL;
#line 192 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_slist_free0 (_tmp7_);
#line 192 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	result = _tmp8_;
#line 192 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (buffer);
#line 192 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 491 "gitg-diff-view-file-selectable.c"
}


static gboolean gitg_diff_view_file_selectable_get_iter_from_pointer_position (GitgDiffViewFileSelectable* self, GtkTextIter* iter) {
	GtkTextIter _vala_iter = {0};
	gboolean result = FALSE;
	GdkWindow* win = NULL;
	GtkSourceView* _tmp0_ = NULL;
	GdkWindow* _tmp1_ = NULL;
	GdkWindow* _tmp2_ = NULL;
	gint x = 0;
	gint y = 0;
	gint width = 0;
	gint height = 0;
	GtkTextIter dummy_iter = {0};
	GtkTextIter _tmp3_ = {0};
	GdkWindow* _tmp4_ = NULL;
	gint _tmp5_ = 0;
	GdkWindow* _tmp6_ = NULL;
	gint _tmp7_ = 0;
	GdkDevice* pointer = NULL;
	GdkDisplay* _tmp8_ = NULL;
	GdkSeat* _tmp9_ = NULL;
	GdkDevice* _tmp10_ = NULL;
	GdkDevice* _tmp11_ = NULL;
	GdkWindow* _tmp12_ = NULL;
	GdkDevice* _tmp13_ = NULL;
	gint _tmp14_ = 0;
	gint _tmp15_ = 0;
	gboolean _tmp16_ = FALSE;
	gboolean _tmp17_ = FALSE;
	gboolean _tmp18_ = FALSE;
	gint _tmp19_ = 0;
	gint _tmp25_ = 0;
	gint _tmp26_ = 0;
	GtkTextIter _tmp27_ = {0};
	gboolean _tmp28_ = FALSE;
#line 195 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 197 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = self->priv->_source_view;
#line 197 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = gtk_text_view_get_window ((GtkTextView*) _tmp0_, GTK_TEXT_WINDOW_TEXT);
#line 197 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 197 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	win = _tmp2_;
#line 202 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	memset (&dummy_iter, 0, sizeof (GtkTextIter));
#line 203 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp3_ = dummy_iter;
#line 203 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_vala_iter = _tmp3_;
#line 205 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp4_ = win;
#line 205 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp5_ = gdk_window_get_width (_tmp4_);
#line 205 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	width = _tmp5_;
#line 206 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp6_ = win;
#line 206 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp7_ = gdk_window_get_height (_tmp6_);
#line 206 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	height = _tmp7_;
#line 208 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp8_ = gdk_display_get_default ();
#line 208 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp9_ = gdk_display_get_default_seat (_tmp8_);
#line 208 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp10_ = gdk_seat_get_pointer (_tmp9_);
#line 208 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp11_ = _g_object_ref0 (_tmp10_);
#line 208 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	pointer = _tmp11_;
#line 209 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp12_ = win;
#line 209 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp13_ = pointer;
#line 209 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gdk_window_get_device_position (_tmp12_, _tmp13_, &_tmp14_, &_tmp15_, NULL);
#line 209 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	x = _tmp14_;
#line 209 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	y = _tmp15_;
#line 211 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp19_ = x;
#line 211 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp19_ < 0) {
#line 211 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp18_ = TRUE;
#line 583 "gitg-diff-view-file-selectable.c"
	} else {
		gint _tmp20_ = 0;
#line 211 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp20_ = y;
#line 211 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp18_ = _tmp20_ < 0;
#line 590 "gitg-diff-view-file-selectable.c"
	}
#line 211 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp18_) {
#line 211 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp17_ = TRUE;
#line 596 "gitg-diff-view-file-selectable.c"
	} else {
		gint _tmp21_ = 0;
		gint _tmp22_ = 0;
#line 211 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp21_ = x;
#line 211 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp22_ = width;
#line 211 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp17_ = _tmp21_ > _tmp22_;
#line 606 "gitg-diff-view-file-selectable.c"
	}
#line 211 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp17_) {
#line 211 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp16_ = TRUE;
#line 612 "gitg-diff-view-file-selectable.c"
	} else {
		gint _tmp23_ = 0;
		gint _tmp24_ = 0;
#line 211 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp23_ = y;
#line 211 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp24_ = height;
#line 211 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp16_ = _tmp23_ > _tmp24_;
#line 622 "gitg-diff-view-file-selectable.c"
	}
#line 211 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp16_) {
#line 213 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		result = FALSE;
#line 213 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_g_object_unref0 (pointer);
#line 213 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_g_object_unref0 (win);
#line 213 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		if (iter) {
#line 213 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			*iter = _vala_iter;
#line 636 "gitg-diff-view-file-selectable.c"
		}
#line 213 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		return result;
#line 640 "gitg-diff-view-file-selectable.c"
	}
#line 216 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp25_ = x;
#line 216 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp26_ = y;
#line 216 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp28_ = gitg_diff_view_file_selectable_get_iter_from_event_position (self, &_tmp27_, _tmp25_, _tmp26_);
#line 216 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_vala_iter = _tmp27_;
#line 216 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	result = _tmp28_;
#line 216 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (pointer);
#line 216 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (win);
#line 216 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (iter) {
#line 216 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		*iter = _vala_iter;
#line 660 "gitg-diff-view-file-selectable.c"
	}
#line 216 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 664 "gitg-diff-view-file-selectable.c"
}


static gboolean gitg_diff_view_file_selectable_get_iter_from_event_position (GitgDiffViewFileSelectable* self, GtkTextIter* iter, gint x, gint y) {
	GtkTextIter _vala_iter = {0};
	gboolean result = FALSE;
	gint win_x = 0;
	gint win_y = 0;
	GtkSourceView* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	GtkSourceView* _tmp5_ = NULL;
	GtkTextIter _tmp6_ = {0};
#line 219 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 223 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = self->priv->_source_view;
#line 223 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = x;
#line 223 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp2_ = y;
#line 223 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gtk_text_view_window_to_buffer_coords ((GtkTextView*) _tmp0_, GTK_TEXT_WINDOW_TEXT, _tmp1_, _tmp2_, &_tmp3_, &_tmp4_);
#line 223 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	win_x = _tmp3_;
#line 223 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	win_y = _tmp4_;
#line 224 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp5_ = self->priv->_source_view;
#line 224 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gtk_text_view_get_line_at_y ((GtkTextView*) _tmp5_, &_tmp6_, win_y, NULL);
#line 224 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_vala_iter = _tmp6_;
#line 226 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	result = TRUE;
#line 226 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (iter) {
#line 226 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		*iter = _vala_iter;
#line 706 "gitg-diff-view-file-selectable.c"
	}
#line 226 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 710 "gitg-diff-view-file-selectable.c"
}


static void gitg_diff_view_file_selectable_update_selection_range (GitgDiffViewFileSelectable* self, GtkTextIter* start, GtkTextIter* end, gboolean select) {
	GtkSourceBuffer* buffer = NULL;
	GtkSourceView* _tmp0_ = NULL;
	GtkTextBuffer* _tmp1_ = NULL;
	GtkTextBuffer* _tmp2_ = NULL;
	GtkSourceBuffer* _tmp3_ = NULL;
	GtkTextIter real_start = {0};
	GtkTextIter real_end = {0};
	GtkTextIter _tmp4_ = {0};
	GtkTextIter _tmp5_ = {0};
	GtkTextIter _tmp6_ = {0};
	gint _tmp7_ = 0;
	gboolean _tmp11_ = FALSE;
	gint start_line = 0;
	gint _tmp12_ = 0;
	gint end_line = 0;
	gint _tmp13_ = 0;
	GtkTextIter current = {0};
	GtkTextIter _tmp14_ = {0};
	gboolean _tmp38_ = FALSE;
#line 229 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_if_fail (self != NULL);
#line 229 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_if_fail (start != NULL);
#line 229 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_if_fail (end != NULL);
#line 231 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = self->priv->_source_view;
#line 231 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp0_);
#line 231 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp2_ = _tmp1_;
#line 231 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, gtk_source_buffer_get_type ()) ? ((GtkSourceBuffer*) _tmp2_) : NULL);
#line 231 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	buffer = _tmp3_;
#line 235 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp4_ = *start;
#line 235 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	real_start = _tmp4_;
#line 236 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp5_ = *end;
#line 236 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	real_end = _tmp5_;
#line 238 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp6_ = real_end;
#line 238 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp7_ = gtk_text_iter_compare (&real_start, &_tmp6_);
#line 238 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp7_ > 0) {
#line 764 "gitg-diff-view-file-selectable.c"
		GtkTextIter tmp = {0};
		GtkTextIter _tmp8_ = {0};
		GtkTextIter _tmp9_ = {0};
		GtkTextIter _tmp10_ = {0};
#line 240 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp8_ = real_end;
#line 240 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		tmp = _tmp8_;
#line 242 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp9_ = real_start;
#line 242 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		real_end = _tmp9_;
#line 243 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp10_ = tmp;
#line 243 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		real_start = _tmp10_;
#line 781 "gitg-diff-view-file-selectable.c"
	}
#line 246 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gtk_text_iter_set_line_offset (&real_start, 0);
#line 248 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp11_ = gtk_text_iter_ends_line (&real_end);
#line 248 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (!_tmp11_) {
#line 250 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		gtk_text_iter_forward_to_line_end (&real_end);
#line 791 "gitg-diff-view-file-selectable.c"
	}
#line 253 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp12_ = gtk_text_iter_get_line (&real_start);
#line 253 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	start_line = _tmp12_;
#line 254 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp13_ = gtk_text_iter_get_line (&real_end);
#line 254 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	end_line = _tmp13_;
#line 256 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp14_ = real_start;
#line 256 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	current = _tmp14_;
#line 258 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	while (TRUE) {
#line 807 "gitg-diff-view-file-selectable.c"
		gint _tmp15_ = 0;
		gint _tmp16_ = 0;
		GtkTextIter _tmp17_ = {0};
		gboolean _tmp18_ = FALSE;
		gboolean _tmp36_ = FALSE;
		gint _tmp37_ = 0;
#line 258 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp15_ = start_line;
#line 258 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp16_ = end_line;
#line 258 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		if (!(_tmp15_ <= _tmp16_)) {
#line 258 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			break;
#line 822 "gitg-diff-view-file-selectable.c"
		}
#line 260 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp17_ = current;
#line 260 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp18_ = gitg_diff_view_file_selectable_get_line_is_diff (self, &_tmp17_);
#line 260 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		if (_tmp18_) {
#line 830 "gitg-diff-view-file-selectable.c"
			GeeHashMap* _tmp19_ = NULL;
			gint _tmp20_ = 0;
			gboolean _tmp21_ = FALSE;
			gboolean _tmp26_ = FALSE;
#line 262 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			_tmp19_ = self->priv->d_originally_selected;
#line 262 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			_tmp20_ = start_line;
#line 262 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			_tmp21_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp19_, (gpointer) ((gintptr) _tmp20_));
#line 262 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			if (!_tmp21_) {
#line 843 "gitg-diff-view-file-selectable.c"
				GeeHashMap* _tmp22_ = NULL;
				gint _tmp23_ = 0;
				GtkTextIter _tmp24_ = {0};
				gboolean _tmp25_ = FALSE;
#line 264 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
				_tmp22_ = self->priv->d_originally_selected;
#line 264 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
				_tmp23_ = start_line;
#line 264 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
				_tmp24_ = current;
#line 264 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
				_tmp25_ = gitg_diff_view_file_selectable_get_line_selected (self, &_tmp24_);
#line 264 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
				gee_abstract_map_set ((GeeAbstractMap*) _tmp22_, (gpointer) ((gintptr) _tmp23_), (gpointer) ((gintptr) _tmp25_));
#line 858 "gitg-diff-view-file-selectable.c"
			}
#line 267 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			_tmp26_ = select;
#line 267 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			if (_tmp26_) {
#line 864 "gitg-diff-view-file-selectable.c"
				GtkSourceBuffer* _tmp27_ = NULL;
				const gchar* _tmp28_ = NULL;
				GtkTextIter _tmp29_ = {0};
				GtkTextIter line_end = {0};
				GtkTextIter _tmp30_ = {0};
				gboolean _tmp31_ = FALSE;
				GtkSourceBuffer* _tmp32_ = NULL;
				GtkTextTag* _tmp33_ = NULL;
				GtkTextIter _tmp34_ = {0};
				GtkTextIter _tmp35_ = {0};
#line 269 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
				_tmp27_ = buffer;
#line 269 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
				_tmp28_ = self->priv->d_selection_category;
#line 269 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
				_tmp29_ = current;
#line 269 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
				gtk_source_buffer_create_source_mark (_tmp27_, NULL, _tmp28_, &_tmp29_);
#line 271 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
				_tmp30_ = current;
#line 271 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
				line_end = _tmp30_;
#line 273 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
				_tmp31_ = gtk_text_iter_ends_line (&line_end);
#line 273 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
				if (!_tmp31_) {
#line 275 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
					gtk_text_iter_forward_to_line_end (&line_end);
#line 893 "gitg-diff-view-file-selectable.c"
				}
#line 278 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
				_tmp32_ = buffer;
#line 278 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
				_tmp33_ = self->priv->d_selection_tag;
#line 278 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
				_tmp34_ = current;
#line 278 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
				_tmp35_ = line_end;
#line 278 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
				gtk_text_buffer_apply_tag ((GtkTextBuffer*) _tmp32_, _tmp33_, &_tmp34_, &_tmp35_);
#line 905 "gitg-diff-view-file-selectable.c"
			}
		}
#line 282 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp36_ = gtk_text_iter_forward_line (&current);
#line 282 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		if (!_tmp36_) {
#line 284 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			break;
#line 914 "gitg-diff-view-file-selectable.c"
		}
#line 287 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp37_ = start_line;
#line 287 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		start_line = _tmp37_ + 1;
#line 920 "gitg-diff-view-file-selectable.c"
	}
#line 290 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp38_ = select;
#line 290 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (!_tmp38_) {
#line 926 "gitg-diff-view-file-selectable.c"
		GtkSourceBuffer* _tmp39_ = NULL;
		GtkTextIter _tmp40_ = {0};
		GtkTextIter _tmp41_ = {0};
		const gchar* _tmp42_ = NULL;
		GtkSourceBuffer* _tmp43_ = NULL;
		GtkTextTag* _tmp44_ = NULL;
		GtkTextIter _tmp45_ = {0};
		GtkTextIter _tmp46_ = {0};
#line 292 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp39_ = buffer;
#line 292 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp40_ = real_start;
#line 292 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp41_ = real_end;
#line 292 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp42_ = self->priv->d_selection_category;
#line 292 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		gtk_source_buffer_remove_source_marks (_tmp39_, &_tmp40_, &_tmp41_, _tmp42_);
#line 293 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp43_ = buffer;
#line 293 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp44_ = self->priv->d_selection_tag;
#line 293 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp45_ = real_start;
#line 293 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp46_ = real_end;
#line 293 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		gtk_text_buffer_remove_tag ((GtkTextBuffer*) _tmp43_, _tmp44_, &_tmp45_, &_tmp46_);
#line 955 "gitg-diff-view-file-selectable.c"
	}
#line 229 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (buffer);
#line 959 "gitg-diff-view-file-selectable.c"
}


static void gitg_diff_view_file_selectable_clear_original_selection (GitgDiffViewFileSelectable* self, GtkTextIter* start, GtkTextIter* end, gboolean include_end) {
	GtkTextIter current = {0};
	GtkTextIter _tmp0_ = {0};
	gint end_line = 0;
	gint _tmp1_ = 0;
	gint current_line = 0;
	gint _tmp2_ = 0;
	gboolean _tmp3_ = FALSE;
#line 297 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_if_fail (self != NULL);
#line 297 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_if_fail (start != NULL);
#line 297 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_if_fail (end != NULL);
#line 299 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = *start;
#line 299 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	current = _tmp0_;
#line 300 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gtk_text_iter_set_line_offset (&current, 0);
#line 302 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = gtk_text_iter_get_line (end);
#line 302 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	end_line = _tmp1_;
#line 303 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp2_ = gtk_text_iter_get_line (&current);
#line 303 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	current_line = _tmp2_;
#line 305 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp3_ = include_end;
#line 305 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp3_) {
#line 995 "gitg-diff-view-file-selectable.c"
		gint _tmp4_ = 0;
#line 307 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp4_ = end_line;
#line 307 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		end_line = _tmp4_ + 1;
#line 1001 "gitg-diff-view-file-selectable.c"
	}
#line 310 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	while (TRUE) {
#line 1005 "gitg-diff-view-file-selectable.c"
		gint _tmp5_ = 0;
		gint _tmp6_ = 0;
		gboolean originally_selected = FALSE;
		GeeHashMap* _tmp7_ = NULL;
		gint _tmp8_ = 0;
		gpointer _tmp9_ = NULL;
		GtkTextIter _tmp10_ = {0};
		GtkTextIter _tmp11_ = {0};
		gboolean _tmp12_ = FALSE;
		gint _tmp13_ = 0;
#line 310 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp5_ = current_line;
#line 310 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp6_ = end_line;
#line 310 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		if (!(_tmp5_ < _tmp6_)) {
#line 310 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			break;
#line 1024 "gitg-diff-view-file-selectable.c"
		}
#line 312 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp7_ = self->priv->d_originally_selected;
#line 312 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp8_ = current_line;
#line 312 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp9_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp7_, (gpointer) ((gintptr) _tmp8_));
#line 312 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		originally_selected = (gboolean) ((gintptr) _tmp9_);
#line 314 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp10_ = current;
#line 314 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp11_ = current;
#line 314 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp12_ = originally_selected;
#line 314 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		gitg_diff_view_file_selectable_update_selection_range (self, &_tmp10_, &_tmp11_, _tmp12_);
#line 316 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		gtk_text_iter_forward_line (&current);
#line 317 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp13_ = current_line;
#line 317 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		current_line = _tmp13_ + 1;
#line 1048 "gitg-diff-view-file-selectable.c"
	}
}


static void gitg_diff_view_file_selectable_forward_to_hunk_end (GitgDiffViewFileSelectable* self, GtkTextIter* iter) {
	GtkSourceBuffer* buffer = NULL;
	GtkSourceView* _tmp0_ = NULL;
	GtkTextBuffer* _tmp1_ = NULL;
	GtkTextBuffer* _tmp2_ = NULL;
	GtkSourceBuffer* _tmp3_ = NULL;
	GtkSourceBuffer* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
#line 321 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_if_fail (self != NULL);
#line 321 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_if_fail (iter != NULL);
#line 323 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gtk_text_iter_forward_line (iter);
#line 325 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = self->priv->_source_view;
#line 325 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp0_);
#line 325 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp2_ = _tmp1_;
#line 325 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, gtk_source_buffer_get_type ()) ? ((GtkSourceBuffer*) _tmp2_) : NULL);
#line 325 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	buffer = _tmp3_;
#line 327 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp4_ = buffer;
#line 327 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp5_ = gtk_source_buffer_forward_iter_to_source_mark (_tmp4_, iter, "header");
#line 327 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (!_tmp5_) {
#line 329 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		gtk_text_iter_forward_to_end (iter);
#line 1085 "gitg-diff-view-file-selectable.c"
	}
#line 321 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (buffer);
#line 1089 "gitg-diff-view-file-selectable.c"
}


static gboolean gitg_diff_view_file_selectable_hunk_is_all_selected (GitgDiffViewFileSelectable* self, GtkTextIter* iter) {
	gboolean result = FALSE;
	GtkTextIter start = {0};
	GtkTextIter _tmp0_ = {0};
	GtkTextIter end = {0};
	GtkTextIter _tmp1_ = {0};
#line 333 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 333 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (iter != NULL, FALSE);
#line 335 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = *iter;
#line 335 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	start = _tmp0_;
#line 336 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gtk_text_iter_forward_line (&start);
#line 338 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = *iter;
#line 338 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	end = _tmp1_;
#line 339 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gitg_diff_view_file_selectable_forward_to_hunk_end (self, &end);
#line 341 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	while (TRUE) {
#line 1117 "gitg-diff-view-file-selectable.c"
		GtkTextIter _tmp2_ = {0};
		gint _tmp3_ = 0;
		gboolean _tmp4_ = FALSE;
		GtkTextIter _tmp5_ = {0};
		gboolean _tmp6_ = FALSE;
		gboolean _tmp9_ = FALSE;
#line 341 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp2_ = end;
#line 341 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp3_ = gtk_text_iter_compare (&start, &_tmp2_);
#line 341 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		if (!(_tmp3_ <= 0)) {
#line 341 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			break;
#line 1132 "gitg-diff-view-file-selectable.c"
		}
#line 343 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp5_ = start;
#line 343 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp6_ = gitg_diff_view_file_selectable_get_line_is_diff (self, &_tmp5_);
#line 343 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		if (_tmp6_) {
#line 1140 "gitg-diff-view-file-selectable.c"
			GtkTextIter _tmp7_ = {0};
			gboolean _tmp8_ = FALSE;
#line 343 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			_tmp7_ = start;
#line 343 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			_tmp8_ = gitg_diff_view_file_selectable_get_line_selected (self, &_tmp7_);
#line 343 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			_tmp4_ = !_tmp8_;
#line 1149 "gitg-diff-view-file-selectable.c"
		} else {
#line 343 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			_tmp4_ = FALSE;
#line 1153 "gitg-diff-view-file-selectable.c"
		}
#line 343 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		if (_tmp4_) {
#line 345 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			result = FALSE;
#line 345 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			return result;
#line 1161 "gitg-diff-view-file-selectable.c"
		}
#line 348 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp9_ = gtk_text_iter_forward_line (&start);
#line 348 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		if (!_tmp9_) {
#line 350 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			break;
#line 1169 "gitg-diff-view-file-selectable.c"
		}
	}
#line 354 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	result = TRUE;
#line 354 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 1176 "gitg-diff-view-file-selectable.c"
}


static void gitg_diff_view_file_selectable_update_selection_hunk (GitgDiffViewFileSelectable* self, GtkTextIter* iter, gboolean select) {
	GtkTextIter end = {0};
	GtkTextIter _tmp0_ = {0};
	GtkTextIter _tmp1_ = {0};
	GtkTextIter _tmp2_ = {0};
	gboolean _tmp3_ = FALSE;
#line 357 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_if_fail (self != NULL);
#line 357 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_if_fail (iter != NULL);
#line 359 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = *iter;
#line 359 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	end = _tmp0_;
#line 360 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gitg_diff_view_file_selectable_forward_to_hunk_end (self, &end);
#line 362 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = *iter;
#line 362 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp2_ = end;
#line 362 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp3_ = select;
#line 362 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gitg_diff_view_file_selectable_update_selection_range (self, &_tmp1_, &_tmp2_, _tmp3_);
#line 1204 "gitg-diff-view-file-selectable.c"
}


static gboolean gitg_diff_view_file_selectable_button_press_event_on_view (GitgDiffViewFileSelectable* self, GdkEventButton* event) {
	gboolean result = FALSE;
	GdkEventButton* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	GtkTextIter iter = {0};
	GtkTextIter _tmp2_ = {0};
	gboolean _tmp3_ = FALSE;
	GtkTextBuffer* buffer = NULL;
	GtkSourceView* _tmp4_ = NULL;
	GtkTextBuffer* _tmp5_ = NULL;
	GtkTextBuffer* _tmp6_ = NULL;
	GtkTextBuffer* _tmp7_ = NULL;
	GdkEventButton* _tmp8_ = NULL;
	GdkModifierType _tmp9_ = 0;
	GtkTextIter _tmp11_ = {0};
	gboolean _tmp12_ = FALSE;
	gboolean select = FALSE;
	GtkTextIter _tmp16_ = {0};
	gboolean _tmp17_ = FALSE;
	gboolean _tmp18_ = FALSE;
	GeeHashMap* _tmp19_ = NULL;
	GtkTextBuffer* _tmp20_ = NULL;
	GtkTextMark* _tmp21_ = NULL;
	GtkTextIter _tmp22_ = {0};
	GtkTextBuffer* _tmp23_ = NULL;
	GtkTextMark* _tmp24_ = NULL;
	GtkTextIter _tmp25_ = {0};
	GtkTextIter _tmp26_ = {0};
#line 365 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 365 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 367 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = event;
#line 367 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = _tmp0_->button;
#line 367 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp1_ != ((guint) 1)) {
#line 369 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		result = FALSE;
#line 369 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		return result;
#line 1250 "gitg-diff-view-file-selectable.c"
	}
#line 374 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp3_ = gitg_diff_view_file_selectable_get_iter_from_pointer_position (self, &_tmp2_);
#line 374 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	iter = _tmp2_;
#line 374 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (!_tmp3_) {
#line 376 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		result = FALSE;
#line 376 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		return result;
#line 1262 "gitg-diff-view-file-selectable.c"
	}
#line 379 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp4_ = self->priv->_source_view;
#line 379 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp5_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp4_);
#line 379 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp6_ = _tmp5_;
#line 379 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp7_ = _g_object_ref0 (_tmp6_);
#line 379 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	buffer = _tmp7_;
#line 381 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp8_ = event;
#line 381 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp9_ = _tmp8_->state;
#line 381 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if ((_tmp9_ & GDK_SHIFT_MASK) != 0) {
#line 1280 "gitg-diff-view-file-selectable.c"
		GtkTextIter _tmp10_ = {0};
#line 383 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp10_ = iter;
#line 383 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		gitg_diff_view_file_selectable_update_selection (self, &_tmp10_);
#line 384 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		result = TRUE;
#line 384 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_g_object_unref0 (buffer);
#line 384 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		return result;
#line 1292 "gitg-diff-view-file-selectable.c"
	}
#line 387 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp11_ = iter;
#line 387 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp12_ = gitg_diff_view_file_selectable_get_line_is_hunk (self, &_tmp11_);
#line 387 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp12_) {
#line 1300 "gitg-diff-view-file-selectable.c"
		GtkTextIter _tmp13_ = {0};
		GtkTextIter _tmp14_ = {0};
		gboolean _tmp15_ = FALSE;
#line 389 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp13_ = iter;
#line 389 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp14_ = iter;
#line 389 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp15_ = gitg_diff_view_file_selectable_hunk_is_all_selected (self, &_tmp14_);
#line 389 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		gitg_diff_view_file_selectable_update_selection_hunk (self, &_tmp13_, !_tmp15_);
#line 390 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		result = TRUE;
#line 390 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_g_object_unref0 (buffer);
#line 390 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		return result;
#line 1318 "gitg-diff-view-file-selectable.c"
	}
#line 393 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	self->priv->d_is_rubber_band = TRUE;
#line 395 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp16_ = iter;
#line 395 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp17_ = gitg_diff_view_file_selectable_get_line_selected (self, &_tmp16_);
#line 395 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	select = !_tmp17_;
#line 397 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp18_ = select;
#line 397 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp18_) {
#line 399 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		self->priv->d_selection_mode = GITG_DIFF_SELECTION_MODE_SELECTING;
#line 1334 "gitg-diff-view-file-selectable.c"
	} else {
#line 403 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		self->priv->d_selection_mode = GITG_DIFF_SELECTION_MODE_DESELECTING;
#line 1338 "gitg-diff-view-file-selectable.c"
	}
#line 406 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp19_ = self->priv->d_originally_selected;
#line 406 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp19_);
#line 408 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp20_ = buffer;
#line 408 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp21_ = self->priv->d_start_selection_mark;
#line 408 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp22_ = iter;
#line 408 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gtk_text_buffer_move_mark (_tmp20_, _tmp21_, &_tmp22_);
#line 409 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp23_ = buffer;
#line 409 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp24_ = self->priv->d_end_selection_mark;
#line 409 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp25_ = iter;
#line 409 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gtk_text_buffer_move_mark (_tmp23_, _tmp24_, &_tmp25_);
#line 411 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp26_ = iter;
#line 411 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gitg_diff_view_file_selectable_update_selection (self, &_tmp26_);
#line 413 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	result = TRUE;
#line 413 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (buffer);
#line 413 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 1370 "gitg-diff-view-file-selectable.c"
}


static void gitg_diff_view_file_selectable_update_selection (GitgDiffViewFileSelectable* self, GtkTextIter* cursor) {
	GtkTextBuffer* buffer = NULL;
	GtkSourceView* _tmp0_ = NULL;
	GtkTextBuffer* _tmp1_ = NULL;
	GtkTextBuffer* _tmp2_ = NULL;
	GtkTextBuffer* _tmp3_ = NULL;
	GtkTextIter start = {0};
	GtkTextIter end = {0};
	GtkTextBuffer* _tmp4_ = NULL;
	GtkTextMark* _tmp5_ = NULL;
	GtkTextIter _tmp6_ = {0};
	GtkTextBuffer* _tmp7_ = NULL;
	GtkTextMark* _tmp8_ = NULL;
	GtkTextIter _tmp9_ = {0};
	gint _tmp10_ = 0;
	gint _tmp11_ = 0;
	GtkTextIter _tmp21_ = {0};
	GtkTextIter _tmp22_ = {0};
	GitgDiffSelectionMode _tmp23_ = 0;
	GtkTextBuffer* _tmp24_ = NULL;
	GtkTextMark* _tmp25_ = NULL;
	GtkTextIter _tmp26_ = {0};
#line 416 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_if_fail (self != NULL);
#line 416 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_if_fail (cursor != NULL);
#line 418 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = self->priv->_source_view;
#line 418 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp0_);
#line 418 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp2_ = _tmp1_;
#line 418 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 418 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	buffer = _tmp3_;
#line 422 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp4_ = buffer;
#line 422 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp5_ = self->priv->d_start_selection_mark;
#line 422 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gtk_text_buffer_get_iter_at_mark (_tmp4_, &_tmp6_, _tmp5_);
#line 422 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	start = _tmp6_;
#line 423 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp7_ = buffer;
#line 423 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp8_ = self->priv->d_end_selection_mark;
#line 423 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gtk_text_buffer_get_iter_at_mark (_tmp7_, &_tmp9_, _tmp8_);
#line 423 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	end = _tmp9_;
#line 426 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp10_ = gtk_text_iter_get_line (&start);
#line 426 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp11_ = gtk_text_iter_get_line (&end);
#line 426 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp10_ < _tmp11_) {
#line 1432 "gitg-diff-view-file-selectable.c"
		GtkTextIter _tmp12_ = {0};
		gint _tmp13_ = 0;
		gint _tmp14_ = 0;
		GtkTextIter next = {0};
		GtkTextIter _tmp17_ = {0};
		GtkTextIter _tmp18_ = {0};
#line 428 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp13_ = gtk_text_iter_get_line (&start);
#line 428 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp14_ = gtk_text_iter_get_line (cursor);
#line 428 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		if (_tmp13_ < _tmp14_) {
#line 1445 "gitg-diff-view-file-selectable.c"
			GtkTextIter _tmp15_ = {0};
#line 428 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			_tmp15_ = *cursor;
#line 428 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			_tmp12_ = _tmp15_;
#line 1451 "gitg-diff-view-file-selectable.c"
		} else {
			GtkTextIter _tmp16_ = {0};
#line 428 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			_tmp16_ = start;
#line 428 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			_tmp12_ = _tmp16_;
#line 1458 "gitg-diff-view-file-selectable.c"
		}
#line 428 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		next = _tmp12_;
#line 429 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		gtk_text_iter_forward_line (&next);
#line 431 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp17_ = next;
#line 431 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp18_ = end;
#line 431 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		gitg_diff_view_file_selectable_clear_original_selection (self, &_tmp17_, &_tmp18_, TRUE);
#line 1470 "gitg-diff-view-file-selectable.c"
	} else {
		GtkTextIter _tmp19_ = {0};
		GtkTextIter _tmp20_ = {0};
#line 435 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp19_ = end;
#line 435 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp20_ = *cursor;
#line 435 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		gitg_diff_view_file_selectable_clear_original_selection (self, &_tmp19_, &_tmp20_, FALSE);
#line 1480 "gitg-diff-view-file-selectable.c"
	}
#line 438 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp21_ = start;
#line 438 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp22_ = *cursor;
#line 438 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp23_ = self->priv->d_selection_mode;
#line 438 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gitg_diff_view_file_selectable_update_selection_range (self, &_tmp21_, &_tmp22_, _tmp23_ == GITG_DIFF_SELECTION_MODE_SELECTING);
#line 439 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp24_ = buffer;
#line 439 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp25_ = self->priv->d_end_selection_mark;
#line 439 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp26_ = *cursor;
#line 439 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gtk_text_buffer_move_mark (_tmp24_, _tmp25_, &_tmp26_);
#line 416 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (buffer);
#line 1500 "gitg-diff-view-file-selectable.c"
}


static gboolean gitg_diff_view_file_selectable_update_selection_event (GitgDiffViewFileSelectable* self, GdkModifierType state, gint x, gint y) {
	gboolean result = FALSE;
	GtkTextIter iter = {0};
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	GtkTextIter _tmp2_ = {0};
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp17_ = FALSE;
	GtkTextIter _tmp18_ = {0};
#line 442 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 446 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = x;
#line 446 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = y;
#line 446 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp3_ = gitg_diff_view_file_selectable_get_iter_from_event_position (self, &_tmp2_, _tmp0_, _tmp1_);
#line 446 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	iter = _tmp2_;
#line 446 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (!_tmp3_) {
#line 448 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		result = FALSE;
#line 448 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		return result;
#line 1531 "gitg-diff-view-file-selectable.c"
	}
#line 451 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp5_ = self->priv->d_is_rubber_band;
#line 451 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp5_) {
#line 451 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp4_ = TRUE;
#line 1539 "gitg-diff-view-file-selectable.c"
	} else {
		gboolean _tmp6_ = FALSE;
		GtkTextIter _tmp7_ = {0};
		gboolean _tmp8_ = FALSE;
#line 451 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp7_ = iter;
#line 451 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp8_ = gitg_diff_view_file_selectable_get_line_is_diff (self, &_tmp7_);
#line 451 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		if (_tmp8_) {
#line 451 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			_tmp6_ = TRUE;
#line 1552 "gitg-diff-view-file-selectable.c"
		} else {
			GtkTextIter _tmp9_ = {0};
			gboolean _tmp10_ = FALSE;
#line 451 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			_tmp9_ = iter;
#line 451 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			_tmp10_ = gitg_diff_view_file_selectable_get_line_is_hunk (self, &_tmp9_);
#line 451 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			_tmp6_ = _tmp10_;
#line 1562 "gitg-diff-view-file-selectable.c"
		}
#line 451 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp4_ = _tmp6_;
#line 1566 "gitg-diff-view-file-selectable.c"
	}
#line 451 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp4_) {
#line 1570 "gitg-diff-view-file-selectable.c"
		GdkCursor* _tmp11_ = NULL;
		GdkCursor* _tmp12_ = NULL;
		GdkCursor* _tmp13_ = NULL;
#line 453 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp11_ = gitg_diff_view_file_selectable_get_cursor_hand (self);
#line 453 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp12_ = _tmp11_;
#line 453 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp13_ = _tmp12_;
#line 453 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		gitg_diff_view_file_selectable_update_cursor (self, _tmp13_);
#line 453 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_g_object_unref0 (_tmp13_);
#line 1584 "gitg-diff-view-file-selectable.c"
	} else {
		GdkCursor* _tmp14_ = NULL;
		GdkCursor* _tmp15_ = NULL;
		GdkCursor* _tmp16_ = NULL;
#line 457 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp14_ = gitg_diff_view_file_selectable_get_cursor_ptr (self);
#line 457 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp15_ = _tmp14_;
#line 457 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp16_ = _tmp15_;
#line 457 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		gitg_diff_view_file_selectable_update_cursor (self, _tmp16_);
#line 457 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_g_object_unref0 (_tmp16_);
#line 1599 "gitg-diff-view-file-selectable.c"
	}
#line 460 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp17_ = self->priv->d_is_rubber_band;
#line 460 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (!_tmp17_) {
#line 462 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		result = FALSE;
#line 462 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		return result;
#line 1609 "gitg-diff-view-file-selectable.c"
	}
#line 465 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp18_ = iter;
#line 465 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gitg_diff_view_file_selectable_update_selection (self, &_tmp18_);
#line 466 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	result = TRUE;
#line 466 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 1619 "gitg-diff-view-file-selectable.c"
}


static gboolean gitg_diff_view_file_selectable_motion_notify_event_on_view (GitgDiffViewFileSelectable* self, GdkEventMotion* event) {
	gboolean result = FALSE;
	GdkEventMotion* _tmp0_ = NULL;
	GdkModifierType _tmp1_ = 0;
	GdkEventMotion* _tmp2_ = NULL;
	gdouble _tmp3_ = 0.0;
	GdkEventMotion* _tmp4_ = NULL;
	gdouble _tmp5_ = 0.0;
	gboolean _tmp6_ = FALSE;
#line 469 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 469 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 471 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = event;
#line 471 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = _tmp0_->state;
#line 471 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp2_ = event;
#line 471 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp3_ = _tmp2_->x;
#line 471 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp4_ = event;
#line 471 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp5_ = _tmp4_->y;
#line 471 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp6_ = gitg_diff_view_file_selectable_update_selection_event (self, _tmp1_, (gint) _tmp3_, (gint) _tmp5_);
#line 471 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	result = _tmp6_;
#line 471 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 1654 "gitg-diff-view-file-selectable.c"
}


static gboolean gitg_diff_view_file_selectable_leave_notify_event_on_view (GitgDiffViewFileSelectable* self, GdkEventCrossing* event) {
	gboolean result = FALSE;
	GdkEventCrossing* _tmp0_ = NULL;
	GdkModifierType _tmp1_ = 0;
	GdkEventCrossing* _tmp2_ = NULL;
	gdouble _tmp3_ = 0.0;
	GdkEventCrossing* _tmp4_ = NULL;
	gdouble _tmp5_ = 0.0;
	gboolean _tmp6_ = FALSE;
#line 474 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 474 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 476 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = event;
#line 476 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = _tmp0_->state;
#line 476 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp2_ = event;
#line 476 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp3_ = _tmp2_->x;
#line 476 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp4_ = event;
#line 476 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp5_ = _tmp4_->y;
#line 476 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp6_ = gitg_diff_view_file_selectable_update_selection_event (self, _tmp1_, (gint) _tmp3_, (gint) _tmp5_);
#line 476 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	result = _tmp6_;
#line 476 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 1689 "gitg-diff-view-file-selectable.c"
}


static gboolean gitg_diff_view_file_selectable_enter_notify_event_on_view (GitgDiffViewFileSelectable* self, GdkEventCrossing* event) {
	gboolean result = FALSE;
	GdkEventCrossing* _tmp0_ = NULL;
	GdkModifierType _tmp1_ = 0;
	GdkEventCrossing* _tmp2_ = NULL;
	gdouble _tmp3_ = 0.0;
	GdkEventCrossing* _tmp4_ = NULL;
	gdouble _tmp5_ = 0.0;
	gboolean _tmp6_ = FALSE;
#line 479 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 479 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 481 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = event;
#line 481 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = _tmp0_->state;
#line 481 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp2_ = event;
#line 481 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp3_ = _tmp2_->x;
#line 481 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp4_ = event;
#line 481 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp5_ = _tmp4_->y;
#line 481 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp6_ = gitg_diff_view_file_selectable_update_selection_event (self, _tmp1_, (gint) _tmp3_, (gint) _tmp5_);
#line 481 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	result = _tmp6_;
#line 481 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 1724 "gitg-diff-view-file-selectable.c"
}


static void gitg_diff_view_file_selectable_update_has_selection (GitgDiffViewFileSelectable* self) {
	GtkTextBuffer* buffer = NULL;
	GtkSourceView* _tmp0_ = NULL;
	GtkTextBuffer* _tmp1_ = NULL;
	GtkTextBuffer* _tmp2_ = NULL;
	GtkTextBuffer* _tmp3_ = NULL;
	GtkTextIter iter = {0};
	GtkTextBuffer* _tmp4_ = NULL;
	GtkTextIter _tmp5_ = {0};
	gboolean something_selected = FALSE;
	GtkTextIter _tmp6_ = {0};
	gboolean _tmp7_ = FALSE;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp12_ = FALSE;
#line 484 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_if_fail (self != NULL);
#line 486 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = self->priv->_source_view;
#line 486 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp0_);
#line 486 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp2_ = _tmp1_;
#line 486 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 486 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	buffer = _tmp3_;
#line 489 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp4_ = buffer;
#line 489 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gtk_text_buffer_get_start_iter (_tmp4_, &_tmp5_);
#line 489 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	iter = _tmp5_;
#line 491 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	something_selected = FALSE;
#line 493 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp6_ = iter;
#line 493 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp7_ = gitg_diff_view_file_selectable_get_line_selected (self, &_tmp6_);
#line 493 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp7_) {
#line 495 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		something_selected = TRUE;
#line 1770 "gitg-diff-view-file-selectable.c"
	} else {
		GtkTextBuffer* _tmp8_ = NULL;
		const gchar* _tmp9_ = NULL;
		gboolean _tmp10_ = FALSE;
#line 499 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp8_ = buffer;
#line 499 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp9_ = self->priv->d_selection_category;
#line 499 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp10_ = gtk_source_buffer_forward_iter_to_source_mark (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, gtk_source_buffer_get_type ()) ? ((GtkSourceBuffer*) _tmp8_) : NULL, &iter, _tmp9_);
#line 499 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		something_selected = _tmp10_;
#line 1783 "gitg-diff-view-file-selectable.c"
	}
#line 502 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp11_ = something_selected;
#line 502 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp12_ = self->priv->_has_selection;
#line 502 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp11_ != _tmp12_) {
#line 1791 "gitg-diff-view-file-selectable.c"
		gboolean _tmp13_ = FALSE;
#line 504 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp13_ = something_selected;
#line 504 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		gitg_diff_view_file_selectable_set_has_selection (self, _tmp13_);
#line 1797 "gitg-diff-view-file-selectable.c"
	}
#line 484 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (buffer);
#line 1801 "gitg-diff-view-file-selectable.c"
}


static gboolean gitg_diff_view_file_selectable_button_release_event_on_view (GitgDiffViewFileSelectable* self, GdkEventButton* event) {
	gboolean result = FALSE;
	GdkEventButton* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
#line 508 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 508 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 510 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	self->priv->d_is_rubber_band = FALSE;
#line 512 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = event;
#line 512 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = _tmp0_->button;
#line 512 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp1_ != ((guint) 1)) {
#line 514 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		result = FALSE;
#line 514 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		return result;
#line 1825 "gitg-diff-view-file-selectable.c"
	}
#line 517 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gitg_diff_view_file_selectable_update_has_selection (self);
#line 519 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	result = TRUE;
#line 519 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 1833 "gitg-diff-view-file-selectable.c"
}


GtkSourceView* gitg_diff_view_file_selectable_get_source_view (GitgDiffViewFileSelectable* self) {
	GtkSourceView* result;
	GtkSourceView* _tmp0_ = NULL;
#line 40 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 40 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = self->priv->_source_view;
#line 40 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	result = _tmp0_;
#line 40 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 1848 "gitg-diff-view-file-selectable.c"
}


void gitg_diff_view_file_selectable_set_source_view (GitgDiffViewFileSelectable* self, GtkSourceView* value) {
	GtkSourceView* _tmp0_ = NULL;
	GtkSourceView* _tmp1_ = NULL;
#line 40 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_if_fail (self != NULL);
#line 40 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = value;
#line 40 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 40 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (self->priv->_source_view);
#line 40 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	self->priv->_source_view = _tmp1_;
#line 40 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_object_notify ((GObject *) self, "source-view");
#line 1867 "gitg-diff-view-file-selectable.c"
}


gboolean gitg_diff_view_file_selectable_get_has_selection (GitgDiffViewFileSelectable* self) {
	gboolean result;
	gboolean _tmp0_ = FALSE;
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = self->priv->_has_selection;
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	result = _tmp0_;
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 1882 "gitg-diff-view-file-selectable.c"
}


static void gitg_diff_view_file_selectable_set_has_selection (GitgDiffViewFileSelectable* self, gboolean value) {
	gboolean _tmp0_ = FALSE;
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_if_fail (self != NULL);
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = value;
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	self->priv->_has_selection = _tmp0_;
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_object_notify ((GObject *) self, "has-selection");
#line 1896 "gitg-diff-view-file-selectable.c"
}


static void _vala_array_add3 (gint** array, int* length, int* size, gint value) {
#line 61 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if ((*length) == (*size)) {
#line 61 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 61 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		*array = g_renew (gint, *array, *size);
#line 1907 "gitg-diff-view-file-selectable.c"
	}
#line 61 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	(*array)[(*length)++] = value;
#line 1911 "gitg-diff-view-file-selectable.c"
}


gint* gitg_diff_view_file_selectable_get_selected_lines (GitgDiffViewFileSelectable* self, int* result_length1) {
	gint* result;
	gint* ret = NULL;
	gint* _tmp0_ = NULL;
	gint ret_length1 = 0;
	gint _ret_size_ = 0;
	GtkTextIter iter = {0};
	GtkSourceBuffer* buffer = NULL;
	GtkSourceView* _tmp1_ = NULL;
	GtkTextBuffer* _tmp2_ = NULL;
	GtkTextBuffer* _tmp3_ = NULL;
	GtkSourceBuffer* _tmp4_ = NULL;
	GtkSourceBuffer* _tmp5_ = NULL;
	GtkTextIter _tmp6_ = {0};
	gint* _tmp12_ = NULL;
	gint _tmp12__length1 = 0;
#line 50 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 52 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = g_new0 (gint, 0);
#line 52 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	ret = _tmp0_;
#line 52 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	ret_length1 = 0;
#line 52 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_ret_size_ = ret_length1;
#line 55 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = self->priv->_source_view;
#line 55 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp2_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp1_);
#line 55 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp3_ = _tmp2_;
#line 55 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, gtk_source_buffer_get_type ()) ? ((GtkSourceBuffer*) _tmp3_) : NULL);
#line 55 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	buffer = _tmp4_;
#line 57 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp5_ = buffer;
#line 57 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gtk_text_buffer_get_start_iter ((GtkTextBuffer*) _tmp5_, &_tmp6_);
#line 57 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	iter = _tmp6_;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	while (TRUE) {
#line 1959 "gitg-diff-view-file-selectable.c"
		GtkSourceBuffer* _tmp7_ = NULL;
		const gchar* _tmp8_ = NULL;
		gboolean _tmp9_ = FALSE;
		gint* _tmp10_ = NULL;
		gint _tmp10__length1 = 0;
		gint _tmp11_ = 0;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp7_ = buffer;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp8_ = self->priv->d_selection_category;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp9_ = gtk_source_buffer_forward_iter_to_source_mark (_tmp7_, &iter, _tmp8_);
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		if (!_tmp9_) {
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
			break;
#line 1976 "gitg-diff-view-file-selectable.c"
		}
#line 61 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp10_ = ret;
#line 61 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp10__length1 = ret_length1;
#line 61 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp11_ = gtk_text_iter_get_line (&iter);
#line 61 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_vala_array_add3 (&ret, &ret_length1, &_ret_size_, _tmp11_);
#line 1986 "gitg-diff-view-file-selectable.c"
	}
#line 64 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp12_ = ret;
#line 64 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp12__length1 = ret_length1;
#line 64 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (result_length1) {
#line 64 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		*result_length1 = _tmp12__length1;
#line 1996 "gitg-diff-view-file-selectable.c"
	}
#line 64 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	result = _tmp12_;
#line 64 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (buffer);
#line 64 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 2004 "gitg-diff-view-file-selectable.c"
}


static GdkCursor* gitg_diff_view_file_selectable_get_cursor_ptr (GitgDiffViewFileSelectable* self) {
	GdkCursor* result;
	GdkCursor* _tmp0_ = NULL;
	GdkCursor* _tmp4_ = NULL;
	GdkCursor* _tmp5_ = NULL;
#line 105 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 107 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = self->priv->d_cursor_ptr;
#line 107 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp0_ == NULL) {
#line 2019 "gitg-diff-view-file-selectable.c"
		GtkSourceView* _tmp1_ = NULL;
		GdkDisplay* _tmp2_ = NULL;
		GdkCursor* _tmp3_ = NULL;
#line 109 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp1_ = self->priv->_source_view;
#line 109 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp2_ = gtk_widget_get_display ((GtkWidget*) _tmp1_);
#line 109 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp3_ = gdk_cursor_new_for_display (_tmp2_, GDK_LEFT_PTR);
#line 109 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_g_object_unref0 (self->priv->d_cursor_ptr);
#line 109 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		self->priv->d_cursor_ptr = _tmp3_;
#line 2033 "gitg-diff-view-file-selectable.c"
	}
#line 112 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp4_ = self->priv->d_cursor_ptr;
#line 112 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp5_ = _g_object_ref0 (_tmp4_);
#line 112 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	result = _tmp5_;
#line 112 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 2043 "gitg-diff-view-file-selectable.c"
}


static GdkCursor* gitg_diff_view_file_selectable_get_cursor_hand (GitgDiffViewFileSelectable* self) {
	GdkCursor* result;
	GdkCursor* _tmp0_ = NULL;
	GdkCursor* _tmp4_ = NULL;
	GdkCursor* _tmp5_ = NULL;
#line 118 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 120 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = self->priv->d_cursor_hand;
#line 120 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	if (_tmp0_ == NULL) {
#line 2058 "gitg-diff-view-file-selectable.c"
		GtkSourceView* _tmp1_ = NULL;
		GdkDisplay* _tmp2_ = NULL;
		GdkCursor* _tmp3_ = NULL;
#line 122 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp1_ = self->priv->_source_view;
#line 122 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp2_ = gtk_widget_get_display ((GtkWidget*) _tmp1_);
#line 122 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_tmp3_ = gdk_cursor_new_for_display (_tmp2_, GDK_HAND1);
#line 122 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		_g_object_unref0 (self->priv->d_cursor_hand);
#line 122 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		self->priv->d_cursor_hand = _tmp3_;
#line 2072 "gitg-diff-view-file-selectable.c"
	}
#line 125 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp4_ = self->priv->d_cursor_hand;
#line 125 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp5_ = _g_object_ref0 (_tmp4_);
#line 125 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	result = _tmp5_;
#line 125 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 2082 "gitg-diff-view-file-selectable.c"
}


static gboolean _gitg_diff_view_file_selectable_button_press_event_on_view_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
	gboolean result;
	result = gitg_diff_view_file_selectable_button_press_event_on_view ((GitgDiffViewFileSelectable*) self, event);
#line 75 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 2091 "gitg-diff-view-file-selectable.c"
}


static gboolean _gitg_diff_view_file_selectable_motion_notify_event_on_view_gtk_widget_motion_notify_event (GtkWidget* _sender, GdkEventMotion* event, gpointer self) {
	gboolean result;
	result = gitg_diff_view_file_selectable_motion_notify_event_on_view ((GitgDiffViewFileSelectable*) self, event);
#line 76 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 2100 "gitg-diff-view-file-selectable.c"
}


static gboolean _gitg_diff_view_file_selectable_leave_notify_event_on_view_gtk_widget_leave_notify_event (GtkWidget* _sender, GdkEventCrossing* event, gpointer self) {
	gboolean result;
	result = gitg_diff_view_file_selectable_leave_notify_event_on_view ((GitgDiffViewFileSelectable*) self, event);
#line 77 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 2109 "gitg-diff-view-file-selectable.c"
}


static gboolean _gitg_diff_view_file_selectable_enter_notify_event_on_view_gtk_widget_enter_notify_event (GtkWidget* _sender, GdkEventCrossing* event, gpointer self) {
	gboolean result;
	result = gitg_diff_view_file_selectable_enter_notify_event_on_view ((GitgDiffViewFileSelectable*) self, event);
#line 78 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 2118 "gitg-diff-view-file-selectable.c"
}


static gboolean _gitg_diff_view_file_selectable_button_release_event_on_view_gtk_widget_button_release_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
	gboolean result;
	result = gitg_diff_view_file_selectable_button_release_event_on_view ((GitgDiffViewFileSelectable*) self, event);
#line 79 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return result;
#line 2127 "gitg-diff-view-file-selectable.c"
}


static void _gitg_diff_view_file_selectable___lambda49_ (GitgDiffViewFileSelectable* self) {
	GdkCursor* _tmp0_ = NULL;
	GdkCursor* _tmp1_ = NULL;
	GdkCursor* _tmp2_ = NULL;
#line 82 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = gitg_diff_view_file_selectable_get_cursor_ptr (self);
#line 82 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = _tmp0_;
#line 82 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp2_ = _tmp1_;
#line 82 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gitg_diff_view_file_selectable_update_cursor (self, _tmp2_);
#line 82 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (_tmp2_);
#line 2145 "gitg-diff-view-file-selectable.c"
}


static void __gitg_diff_view_file_selectable___lambda49__gtk_widget_realize (GtkWidget* _sender, gpointer self) {
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_gitg_diff_view_file_selectable___lambda49_ ((GitgDiffViewFileSelectable*) self);
#line 2152 "gitg-diff-view-file-selectable.c"
}


static void _gitg_diff_view_file_selectable___lambda50_ (GitgDiffViewFileSelectable* self) {
	GdkCursor* _tmp0_ = NULL;
	GdkCursor* _tmp1_ = NULL;
	GdkCursor* _tmp2_ = NULL;
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = gitg_diff_view_file_selectable_get_cursor_ptr (self);
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = _tmp0_;
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp2_ = _tmp1_;
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gitg_diff_view_file_selectable_update_cursor (self, _tmp2_);
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (_tmp2_);
#line 2170 "gitg-diff-view-file-selectable.c"
}


static void __gitg_diff_view_file_selectable___lambda50__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 85 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_gitg_diff_view_file_selectable___lambda50_ ((GitgDiffViewFileSelectable*) self);
#line 2177 "gitg-diff-view-file-selectable.c"
}


static void _gitg_diff_view_file_selectable_update_theme_gtk_widget_style_updated (GtkWidget* _sender, gpointer self) {
#line 91 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gitg_diff_view_file_selectable_update_theme ((GitgDiffViewFileSelectable*) self);
#line 2184 "gitg-diff-view-file-selectable.c"
}


static GObject * gitg_diff_view_file_selectable_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	GitgDiffViewFileSelectable * self;
	GtkSourceView* _tmp0_ = NULL;
	GtkSourceView* _tmp1_ = NULL;
	GtkSourceView* _tmp2_ = NULL;
	GtkSourceView* _tmp3_ = NULL;
	GtkSourceView* _tmp4_ = NULL;
	GtkSourceView* _tmp5_ = NULL;
	GtkSourceView* _tmp6_ = NULL;
	GtkSourceView* _tmp7_ = NULL;
	GtkTextBuffer* _tmp8_ = NULL;
	GtkTextBuffer* _tmp9_ = NULL;
	GtkTextTag* _tmp10_ = NULL;
	GtkTextTag* _tmp11_ = NULL;
	GtkSourceView* _tmp12_ = NULL;
	GeeHashMap* _tmp13_ = NULL;
	GtkTextIter start = {0};
	GtkSourceView* _tmp14_ = NULL;
	GtkTextBuffer* _tmp15_ = NULL;
	GtkTextBuffer* _tmp16_ = NULL;
	GtkTextIter _tmp17_ = {0};
	GtkSourceView* _tmp18_ = NULL;
	GtkTextBuffer* _tmp19_ = NULL;
	GtkTextBuffer* _tmp20_ = NULL;
	GtkTextIter _tmp21_ = {0};
	GtkTextMark* _tmp22_ = NULL;
	GtkTextMark* _tmp23_ = NULL;
	GtkSourceView* _tmp24_ = NULL;
	GtkTextBuffer* _tmp25_ = NULL;
	GtkTextBuffer* _tmp26_ = NULL;
	GtkTextIter _tmp27_ = {0};
	GtkTextMark* _tmp28_ = NULL;
	GtkTextMark* _tmp29_ = NULL;
#line 73 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	parent_class = G_OBJECT_CLASS (gitg_diff_view_file_selectable_parent_class);
#line 73 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 73 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_DIFF_VIEW_FILE_SELECTABLE, GitgDiffViewFileSelectable);
#line 75 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = self->priv->_source_view;
#line 75 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_signal_connect_object ((GtkWidget*) _tmp0_, "button-press-event", (GCallback) _gitg_diff_view_file_selectable_button_press_event_on_view_gtk_widget_button_press_event, self, 0);
#line 76 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp1_ = self->priv->_source_view;
#line 76 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_signal_connect_object ((GtkWidget*) _tmp1_, "motion-notify-event", (GCallback) _gitg_diff_view_file_selectable_motion_notify_event_on_view_gtk_widget_motion_notify_event, self, 0);
#line 77 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp2_ = self->priv->_source_view;
#line 77 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_signal_connect_object ((GtkWidget*) _tmp2_, "leave-notify-event", (GCallback) _gitg_diff_view_file_selectable_leave_notify_event_on_view_gtk_widget_leave_notify_event, self, 0);
#line 78 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp3_ = self->priv->_source_view;
#line 78 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_signal_connect_object ((GtkWidget*) _tmp3_, "enter-notify-event", (GCallback) _gitg_diff_view_file_selectable_enter_notify_event_on_view_gtk_widget_enter_notify_event, self, 0);
#line 79 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp4_ = self->priv->_source_view;
#line 79 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_signal_connect_object ((GtkWidget*) _tmp4_, "button-release-event", (GCallback) _gitg_diff_view_file_selectable_button_release_event_on_view_gtk_widget_button_release_event, self, 0);
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp5_ = self->priv->_source_view;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_signal_connect_object ((GtkWidget*) _tmp5_, "realize", (GCallback) __gitg_diff_view_file_selectable___lambda49__gtk_widget_realize, self, 0);
#line 85 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp6_ = self->priv->_source_view;
#line 85 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_signal_connect_object ((GObject*) _tmp6_, "notify::state-flags", (GCallback) __gitg_diff_view_file_selectable___lambda50__g_object_notify, self, 0);
#line 89 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp7_ = self->priv->_source_view;
#line 89 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp8_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp7_);
#line 89 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp9_ = _tmp8_;
#line 89 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp10_ = gtk_text_buffer_create_tag (_tmp9_, "selection", NULL);
#line 89 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp11_ = _g_object_ref0 (_tmp10_);
#line 89 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (self->priv->d_selection_tag);
#line 89 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	self->priv->d_selection_tag = _tmp11_;
#line 91 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp12_ = self->priv->_source_view;
#line 91 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_signal_connect_object ((GtkWidget*) _tmp12_, "style-updated", (GCallback) _gitg_diff_view_file_selectable_update_theme_gtk_widget_style_updated, self, 0);
#line 92 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gitg_diff_view_file_selectable_update_theme (self);
#line 94 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp13_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, G_TYPE_BOOLEAN, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 94 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (self->priv->d_originally_selected);
#line 94 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	self->priv->d_originally_selected = _tmp13_;
#line 97 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp14_ = self->priv->_source_view;
#line 97 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp15_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp14_);
#line 97 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp16_ = _tmp15_;
#line 97 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gtk_text_buffer_get_start_iter (_tmp16_, &_tmp17_);
#line 97 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	start = _tmp17_;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp18_ = self->priv->_source_view;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp19_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp18_);
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp20_ = _tmp19_;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp21_ = start;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp22_ = gtk_text_buffer_create_mark (_tmp20_, NULL, &_tmp21_, FALSE);
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp23_ = _g_object_ref0 (_tmp22_);
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (self->priv->d_start_selection_mark);
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	self->priv->d_start_selection_mark = _tmp23_;
#line 100 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp24_ = self->priv->_source_view;
#line 100 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp25_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp24_);
#line 100 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp26_ = _tmp25_;
#line 100 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp27_ = start;
#line 100 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp28_ = gtk_text_buffer_create_mark (_tmp26_, NULL, &_tmp27_, FALSE);
#line 100 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp29_ = _g_object_ref0 (_tmp28_);
#line 100 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (self->priv->d_end_selection_mark);
#line 100 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	self->priv->d_end_selection_mark = _tmp29_;
#line 73 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	return obj;
#line 2327 "gitg-diff-view-file-selectable.c"
}


static void gitg_diff_view_file_selectable_class_init (GitgDiffViewFileSelectableClass * klass) {
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	gitg_diff_view_file_selectable_parent_class = g_type_class_peek_parent (klass);
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_type_class_add_private (klass, sizeof (GitgDiffViewFileSelectablePrivate));
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_gitg_diff_view_file_selectable_get_property;
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_gitg_diff_view_file_selectable_set_property;
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	G_OBJECT_CLASS (klass)->constructor = gitg_diff_view_file_selectable_constructor;
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	G_OBJECT_CLASS (klass)->finalize = gitg_diff_view_file_selectable_finalize;
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_DIFF_VIEW_FILE_SELECTABLE_SOURCE_VIEW, g_param_spec_object ("source-view", "source-view", "source-view", gtk_source_view_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_DIFF_VIEW_FILE_SELECTABLE_HAS_SELECTION, g_param_spec_boolean ("has-selection", "has-selection", "has-selection", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 2348 "gitg-diff-view-file-selectable.c"
}


static void gitg_diff_view_file_selectable_instance_init (GitgDiffViewFileSelectable * self) {
	gchar* _tmp0_ = NULL;
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	self->priv = GITG_DIFF_VIEW_FILE_SELECTABLE_GET_PRIVATE (self);
#line 28 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_tmp0_ = g_strdup ("selection");
#line 28 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	self->priv->d_selection_category = _tmp0_;
#line 2360 "gitg-diff-view-file-selectable.c"
}


static void gitg_diff_view_file_selectable_finalize (GObject* obj) {
	GitgDiffViewFileSelectable * self;
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_DIFF_VIEW_FILE_SELECTABLE, GitgDiffViewFileSelectable);
#line 28 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_free0 (self->priv->d_selection_category);
#line 29 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (self->priv->d_selection_tag);
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (self->priv->d_start_selection_mark);
#line 32 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (self->priv->d_end_selection_mark);
#line 33 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (self->priv->d_originally_selected);
#line 34 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (self->priv->d_cursor_ptr);
#line 35 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (self->priv->d_cursor_hand);
#line 38 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	_g_object_unref0 (self->priv->_source_view);
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	G_OBJECT_CLASS (gitg_diff_view_file_selectable_parent_class)->finalize (obj);
#line 2386 "gitg-diff-view-file-selectable.c"
}


GType gitg_diff_view_file_selectable_get_type (void) {
	static volatile gsize gitg_diff_view_file_selectable_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_diff_view_file_selectable_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GitgDiffViewFileSelectableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_diff_view_file_selectable_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgDiffViewFileSelectable), 0, (GInstanceInitFunc) gitg_diff_view_file_selectable_instance_init, NULL };
		GType gitg_diff_view_file_selectable_type_id;
		gitg_diff_view_file_selectable_type_id = g_type_register_static (G_TYPE_OBJECT, "GitgDiffViewFileSelectable", &g_define_type_info, 0);
		g_once_init_leave (&gitg_diff_view_file_selectable_type_id__volatile, gitg_diff_view_file_selectable_type_id);
	}
	return gitg_diff_view_file_selectable_type_id__volatile;
}


static void _vala_gitg_diff_view_file_selectable_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GitgDiffViewFileSelectable * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_TYPE_DIFF_VIEW_FILE_SELECTABLE, GitgDiffViewFileSelectable);
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	switch (property_id) {
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		case GITG_DIFF_VIEW_FILE_SELECTABLE_SOURCE_VIEW:
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		g_value_set_object (value, gitg_diff_view_file_selectable_get_source_view (self));
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		break;
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		case GITG_DIFF_VIEW_FILE_SELECTABLE_HAS_SELECTION:
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		g_value_set_boolean (value, gitg_diff_view_file_selectable_get_has_selection (self));
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		break;
#line 2419 "gitg-diff-view-file-selectable.c"
		default:
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		break;
#line 2425 "gitg-diff-view-file-selectable.c"
	}
}


static void _vala_gitg_diff_view_file_selectable_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GitgDiffViewFileSelectable * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_TYPE_DIFF_VIEW_FILE_SELECTABLE, GitgDiffViewFileSelectable);
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
	switch (property_id) {
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		case GITG_DIFF_VIEW_FILE_SELECTABLE_SOURCE_VIEW:
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		gitg_diff_view_file_selectable_set_source_view (self, g_value_get_object (value));
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		break;
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		case GITG_DIFF_VIEW_FILE_SELECTABLE_HAS_SELECTION:
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		gitg_diff_view_file_selectable_set_has_selection (self, g_value_get_boolean (value));
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		break;
#line 2447 "gitg-diff-view-file-selectable.c"
		default:
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-diff-view-file-selectable.vala"
		break;
#line 2453 "gitg-diff-view-file-selectable.c"
	}
}



