From 706b86391911e8f19def76d0988cfea227db4e04 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki Date: Thu, 26 Mar 2026 00:37:17 +0900 Subject: [PATCH] Adjust `src_from_REPL` to Julia 1.13 --- Project.toml | 2 +- src/utils.jl | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) 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)