[nautilus/wip/corey/query-editor: 3/3] query-editor: Set position at the end of the text




commit ba7a0d65c2b94980a04f8fad818bafc817a2e0b4
Author: Corey Berla <corey berla me>
Date:   Fri Sep 30 09:19:32 2022 -0700

    query-editor: Set position at the end of the text
    
    If we are updating the query editor's text (i.e. through the
    shell search provider), we should move the cursor position to the
    end of the text, otherwise it's at the beginning of the text.

 src/nautilus-query-editor.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c
index f93b05e87..fa4a81bb1 100644
--- a/src/nautilus-query-editor.c
+++ b/src/nautilus-query-editor.c
@@ -756,6 +756,7 @@ nautilus_query_editor_set_query (NautilusQueryEditor *self,
     if (!g_str_equal (current_text, text))
     {
         gtk_editable_set_text (GTK_EDITABLE (self->text), text);
+        gtk_editable_set_position (GTK_EDITABLE (self->text), -1);
     }
 
     if (g_set_object (&self->query, query))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]