diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-12 01:45:26 +1300 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-12 01:45:26 +1300 |
commit | 1e676b49bee920605529fd5e8f18c14fdfc900e2 (patch) | |
tree | f56fa019065062194c7a077d545870e95fcd1260 /src/windows-jump.adb | |
parent | a937e0b2a25d49e813d85fa3da14ea0c6882ff2f (diff) |
Updated to current FLTK binding
Diffstat (limited to 'src/windows-jump.adb')
-rw-r--r-- | src/windows-jump.adb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/windows-jump.adb b/src/windows-jump.adb index f19315e..baa4171 100644 --- a/src/windows-jump.adb +++ b/src/windows-jump.adb @@ -7,7 +7,7 @@ package body Windows.Jump is package WD renames FLTK.Widgets.Groups.Windows.Double; package BU renames FLTK.Widgets.Buttons; package EN renames FLTK.Widgets.Buttons.Enter; - package IT renames FLTK.Widgets.Inputs.Integer; + package IT renames FLTK.Widgets.Inputs.Text.Whole_Number; @@ -18,10 +18,16 @@ package body Windows.Jump is type Jump_Window_Access is access all Jump_Window; Dialog : access Jump_Window := Jump_Window_Access (Item.Parent); - Line : Integer := Dialog.To_Line.Get_Value; + Line : Long_Integer := Dialog.To_Line.Get_Value; begin - if Dialog.Callback /= null and Line > 0 then - Dialog.Callback.all (Line); + if Dialog.Callback /= null then + if Line <= 0 then + Dialog.Callback (1); + elsif Line > Long_Integer (Integer'Last) then + Dialog.Callback (Integer'Last); + else + Dialog.Callback (Integer (Line)); + end if; end if; end Jump_M; |