aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sdgui.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sdgui.c b/src/sdgui.c
index 3565bc6..c547760 100644
--- a/src/sdgui.c
+++ b/src/sdgui.c
@@ -33,7 +33,6 @@ struct dictionary
const gchar *filename; ///< Filename
StardictDict *dict; ///< Stardict dictionary data
gchar *name; ///< Name to show
- guint position; ///< Current position
};
static struct
@@ -94,11 +93,10 @@ search (Dictionary *dict)
StardictIterator *iterator =
stardict_dict_search (dict->dict, input_utf8, NULL);
- dict->position = stardict_iterator_get_offset (iterator);
+ stardict_view_set_position (STARDICT_VIEW (g.view),
+ dict->dict, stardict_iterator_get_offset (iterator));
g_object_unref (iterator);
- stardict_view_set_position (STARDICT_VIEW (g.view),
- dict->dict, dict->position);
stardict_view_set_matched (STARDICT_VIEW (g.view), input_utf8);
}