summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/reline/line_editor.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index 5968af708b..90cc4b2db2 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -121,7 +121,7 @@ class Reline::LineEditor
if use_cached_prompt_list
prompt_list = @cached_prompt_list
else
- prompt_list = @cached_prompt_list = @prompt_proc.(buffer)
+ prompt_list = @cached_prompt_list = @prompt_proc.(buffer).map { |pr| pr.gsub("\n", "\\n") }
@prompt_cache_time = Time.now.to_f
end
prompt_list.map!{ prompt } if @vi_arg or @searching_prompt