From c4b861ae2d12d40154e3b71495eece8b3cd26dcb Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Wed, 8 Mar 2023 15:14:32 +0100 Subject: [PATCH] fix coloring when scrolling through history (#298) --- src/OhMyREPL.jl | 16 ---------------- src/refresh_lines.jl | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/OhMyREPL.jl b/src/OhMyREPL.jl index c41baf2..333c6ce 100644 --- a/src/OhMyREPL.jl +++ b/src/OhMyREPL.jl @@ -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 diff --git a/src/refresh_lines.jl b/src/refresh_lines.jl index 605285c..00446e6 100644 --- a/src/refresh_lines.jl +++ b/src/refresh_lines.jl @@ -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