On tab, assume we have finished the auto-complete operation

This commit is contained in:
R. Tyler Croy 2017-01-15 18:31:18 -08:00
parent 859787cdbb
commit f4b954aa68
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
1 changed files with 10 additions and 1 deletions

View File

@ -24,6 +24,7 @@ with Ada.Text_IO;
with GNAT.OS_Lib;
with Gdk.Event;
with Gdk.Types.Keysyms;
with Glib;
with Gtk.Main;
with Gtk.Widget;
with Gtk.Search_Entry;
@ -99,7 +100,15 @@ package body Arun.Handlers is
begin
if Event.Keyval = GDK_Tab then
Put_Line ("Should attempt to auto-complete");
-- When the Tab key is presented, let's assume the user is finishing
-- an auto-complete operation jump to the end so
-- they can add arguments if desired
declare
use Glib;
Search_Entry : Gtk.Search_Entry.Gtk_Search_Entry_Record renames Gtk.Search_Entry.Gtk_Search_Entry_Record (Widget.all);
begin
Search_Entry.Set_Position (-1);
end;
end if;