summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pluma/pluma-view.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pluma/pluma-view.c b/pluma/pluma-view.c
index 66ba62a5..4a0522e0 100644
--- a/pluma/pluma-view.c
+++ b/pluma/pluma-view.c
@@ -1627,12 +1627,11 @@ init_search_entry (PlumaView *view)
guint old_find_flags = 0;
gint sel_len = 0;
- g_free (view->priv->old_search_text);
-
old_find_text = pluma_document_get_search_text (PLUMA_DOCUMENT (buffer),
&old_find_flags);
if (old_find_text != NULL)
{
+ g_free (view->priv->old_search_text);
view->priv->old_search_text = old_find_text;
add_search_completion_entry (old_find_text);
}