Skip to content

Commit

Permalink
fix REPL callbacks to use eval so newest world function is executed (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC authored and stevengj committed Jan 11, 2017
1 parent a7fc0e2 commit faaabac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/LineEdit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,8 @@ default_enter_cb(_) = true

write_prompt(terminal, s::PromptState) = write_prompt(terminal, s.p)
function write_prompt(terminal, p::Prompt)
prefix = isa(p.prompt_prefix,Function) ? p.prompt_prefix() : p.prompt_prefix
suffix = isa(p.prompt_suffix,Function) ? p.prompt_suffix() : p.prompt_suffix
prefix = isa(p.prompt_prefix,Function) ? eval(Expr(:call, p.prompt_prefix)) : p.prompt_prefix
suffix = isa(p.prompt_suffix,Function) ? eval(Expr(:call, p.prompt_suffix)) : p.prompt_suffix
write(terminal, prefix)
write(terminal, Base.text_colors[:bold])
write(terminal, p.prompt)
Expand Down Expand Up @@ -734,7 +734,7 @@ end
keymap_fcn(f::Void, c) = (s, p) -> return :ok
function keymap_fcn(f::Function, c)
return function (s, p)
r = f(s, p, c)
r = eval(Expr(:call,f,s, p, c))
if isa(r, Symbol)
return r
else
Expand Down

0 comments on commit faaabac

Please sign in to comment.