diff --git a/src/help.jl b/src/help.jl index a573a264a..01d3eb7f6 100644 --- a/src/help.jl +++ b/src/help.jl @@ -3,8 +3,17 @@ import Markdown import REPL +if isdefined( REPL.TerminalMenus, :default_terminal) + default_terminal = REPL.TerminalMenus.default_terminal +else + # before Julia 1.12 + function default_terminal() + return REPL.TerminalMenus.terminal + end +end + function gap_help_string(topic::String, onlyexact::Bool = false, - term::REPL.Terminals.TTYTerminal = REPL.TerminalMenus.terminal; + term::REPL.Terminals.TTYTerminal = default_terminal(); suppress_output::Bool = false) # Let GAP collect the information. info = Globals.HELP_Info(GapObj(topic), onlyexact) diff --git a/test/help.jl b/test/help.jl index 0b71e6055..08f8e0da2 100644 --- a/test/help.jl +++ b/test/help.jl @@ -1,6 +1,6 @@ @testset "help" begin using GAP.REPL - tt = REPL.TerminalMenus.terminal + tt = GAP.default_terminal() function test_gap_help(topic::String) inp = Base.IOBuffer("qq") # exit the menu if applicable