Skip to content

Commit 00ad4e0

Browse files
authored
Adjust src_from_REPL to Julia 1.13 (#154)
1 parent ddbb6db commit 00ad4e0

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "CodeTracking"
22
uuid = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"
33
authors = ["Tim Holy <tim.holy@gmail.com>"]
4-
version = "3.0.0"
4+
version = "3.0.1"
55

66
[deps]
77
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

src/utils.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,13 @@ end
336336

337337
function src_from_REPL(origin::AbstractString, repl = Base.active_repl)
338338
hist_idx = parse(Int, origin)
339-
hp = repl.interface.modes[1].hist
340-
return hp.history[hp.start_idx+hist_idx]
339+
hp = repl.interface.modes[1].hist::REPL.REPLHistoryProvider
340+
entry = hp.history[hp.start_idx+hist_idx]
341+
@static if VERSION v"1.13-"
342+
return entry.content
343+
else
344+
return entry
345+
end
341346
end
342347

343348
function basepath(id::PkgId)

0 commit comments

Comments
 (0)