Commit cae1194b authored by Christian Hergert's avatar Christian Hergert

update saved position when navigating search results (and not focused)

this happens from the search box
parent 0af62c1d
......@@ -227,9 +227,11 @@ enum {
static GParamSpec *gParamSpecs [LAST_PROP];
static guint gSignals [LAST_SIGNAL];
static void ide_source_view_real_set_mode (IdeSourceView *self,
const gchar *name,
IdeSourceViewModeType type);
static void ide_source_view_real_save_insert_mark (IdeSourceView *self);
static void ide_source_view_real_restore_insert_mark (IdeSourceView *self);
static void ide_source_view_real_set_mode (IdeSourceView *self,
const gchar *name,
IdeSourceViewModeType type);
static SearchMovement *
search_movement_ref (SearchMovement *movement)
......@@ -3100,6 +3102,10 @@ ide_source_view__search_forward_cb (GObject *object,
else
gtk_text_buffer_select_range (buffer, &begin, &begin);
/* if we arent focused, update the saved position marker */
if (!gtk_widget_has_focus (GTK_WIDGET (mv->self)))
ide_source_view_real_save_insert_mark (mv->self);
ide_source_view_scroll_mark_onscreen (mv->self, insert);
}
......@@ -3152,6 +3158,10 @@ ide_source_view__search_backward_cb (GObject *object,
else
gtk_text_buffer_select_range (buffer, &begin, &begin);
/* if we arent focused, update the saved position marker */
if (!gtk_widget_has_focus (GTK_WIDGET (mv->self)))
ide_source_view_real_save_insert_mark (mv->self);
ide_source_view_scroll_mark_onscreen (mv->self, insert);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment