diff --git a/Project.toml b/Project.toml index fd671c0..c7ab2f6 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "CodeTracking" uuid = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" authors = ["Tim Holy "] -version = "3.0.0" +version = "3.0.1" [deps] InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" diff --git a/src/utils.jl b/src/utils.jl index 00967c8..ff2da4e 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -336,8 +336,13 @@ end function src_from_REPL(origin::AbstractString, repl = Base.active_repl) hist_idx = parse(Int, origin) - hp = repl.interface.modes[1].hist - return hp.history[hp.start_idx+hist_idx] + hp = repl.interface.modes[1].hist::REPL.REPLHistoryProvider + entry = hp.history[hp.start_idx+hist_idx] + @static if VERSION ≥ v"1.13-" + return entry.content + else + return entry + end end function basepath(id::PkgId)