Skip to content

Commit

Permalink
fix coloring when scrolling through history (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC authored Mar 8, 2023
1 parent 70e8d5c commit c4b861a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
16 changes: 0 additions & 16 deletions src/OhMyREPL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -125,22 +125,6 @@ function __init__()
reinsert_after_pkg()
end
update_interface(repl.interface)
main_mode = repl.interface.modes[1]
p = repl.interface.modes[5]
# These are inserted here because we only want to insert them for the Julia mode
d = Dict{Any,Any}(
# Up Arrow
"\e[A" => (s,o...)-> begin
REPL.LineEdit.edit_move_up(s) || LineEdit.enter_prefix_search(s, p, true)
Prompt.rewrite_with_ANSI(s)
end,
# Down Arrow
"\e[B" => (s,o...)-> begin
REPL.LineEdit.edit_move_down(s) || LineEdit.enter_prefix_search(s, p, false)
Prompt.rewrite_with_ANSI(s)
end
)
main_mode.keymap_dict = LineEdit.keymap(Dict{Any,Any}[d, main_mode.keymap_dict])
end
end

Expand Down
2 changes: 1 addition & 1 deletion src/refresh_lines.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import REPL.LineEdit

function LineEdit.refresh_line(s)
function LineEdit.refresh_line(s::REPL.LineEdit.BufferLike)
LineEdit.refresh_multi_line(s)
OhMyREPL.Prompt.rewrite_with_ANSI(s)
end

0 comments on commit c4b861a

Please sign in to comment.