summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2022-12-25 01:13:44 +0000
committerAntónio Fernandes <antoniof@gnome.org>2022-12-25 02:47:31 +0000
commitdd08c87df49a964685a0cc8a66e746aa5d90092a (patch)
treedeed999cbe83f46a32a3557a01a0897e9e8be801
parente9b41d50565152bc30d44512284c228fa4dca9ea (diff)
downloadnautilus-wip/antoniof/completion-priority-high.tar.gz
-rw-r--r--src/nautilus-location-entry.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/nautilus-location-entry.c b/src/nautilus-location-entry.c
index 09293c715..aa952b6c4 100644
--- a/src/nautilus-location-entry.c
+++ b/src/nautilus-location-entry.c
@@ -398,12 +398,11 @@ got_completion_data_callback (GFilenameCompleter *completer,
priv = nautilus_location_entry_get_instance_private (entry);
- if (priv->idle_id)
+ if (priv->idle_id == 0)
{
- g_source_remove (priv->idle_id);
- priv->idle_id = 0;
+ priv->idle_id = g_idle_add_full (G_PRIORITY_HIGH,
+ update_completions_store, entry, NULL);
}
- update_completions_store (entry);
}
static void
@@ -575,7 +574,13 @@ after_text_change (NautilusLocationEntry *self,
* but don't insert the completion into the entry. */
priv->idle_insert_completion = insert;
- update_completions_store (self);
+ /* Do the expand at idle time to avoid slowing down typing when the
+ * directory is large. */
+ if (priv->idle_id == 0)
+ {
+ priv->idle_id = g_idle_add_full (G_PRIORITY_HIGH,
+ update_completions_store, self, NULL);
+ }
}
static void