mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/reline] Clear dialog in pasting
https://github.com/ruby/reline/commit/dabf5313e0
This commit is contained in:
parent
f3e30b26c5
commit
7159af3491
2 changed files with 12 additions and 0 deletions
|
@ -651,6 +651,7 @@ class Reline::LineEditor
|
|||
|
||||
private def render_each_dialog(dialog, cursor_column)
|
||||
if @in_pasting
|
||||
clear_each_dialog(dialog)
|
||||
dialog.contents = nil
|
||||
dialog.trap_key = nil
|
||||
return
|
||||
|
|
|
@ -1217,6 +1217,17 @@ begin
|
|||
EOC
|
||||
end
|
||||
|
||||
def test_clear_dialog_in_pasting
|
||||
start_terminal(10, 40, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete}, startup_message: 'Multiline REPL.')
|
||||
write("S")
|
||||
write("tring ")
|
||||
close
|
||||
assert_screen(<<~'EOC')
|
||||
Multiline REPL.
|
||||
prompt> String
|
||||
EOC
|
||||
end
|
||||
|
||||
def write_inputrc(content)
|
||||
File.open(@inputrc_file, 'w') do |f|
|
||||
f.write content
|
||||
|
|
Loading…
Reference in a new issue