with New_Keys;
with Window_Io;
with Io_Exceptions;
with Window_Utilities;
with Fonts;
with Editor;
procedure More_Display (Output_Window : Window_Io.File_Type;
                        Input_Window  : Window_Io.File_Type;
                        The_Lines     : Lines) is

    Window_Length : Window_Io.Line_Number;
    Window_Width  : Window_Io.Column_Number;

    Last_Line : Window_Io.Line_Number;
    Current_Line : Window_Io.Line_Number := 1;

    Cursor_Line : Window_Io.Line_Number;
    Cursor_Column : Window_Io.Column_Number;

    My_Iter : Lines_Iterator := Initialize (The_Lines);

begin
    Window_Io.Report_Size (Output_Window, Window_Length, Window_Width);

    Last_Line     := Window_Length;
    Window_Length := Window_Length - 1;

    Editor.Window.Beginning_Of;

    while not Done (My_Iter) loop
        if Current_Line <= Window_Length then
            Window_Io.Insert (Output_Window, Value (My_Iter));
            Window_Io.New_Line (Output_Window, 1);
            Current_Line := Current_Line + 1;
            Next (My_Iter);
        else
            declare
                Ans : constant String :=
                   Window_Utilities.Prompt_Query
                      (Input_Window  => Input_Window,
                       Output_Window => Output_Window,
                       Prompt        => "HIT 'ENTER' TO CONTINUE",
                       Line          => Last_Line,
                       Column        => 1);
            begin

                if Ans = "" then
                    Editor.Window.Beginning_Of;
                    Last_Line    := Last_Line + Window_Length;
                    Current_Line := 1;
                else
                    return;
                end if;
            end;
        end if;

    end loop;

    Window_Utilities.Continue (Input_Window => Input_Window,
                               Output_Window => Output_Window,
                               Prompt => "HIT 'ENTER' TO CONTINUE",
                               Line => Last_Line,
                               Column => 1);



end More_Display;