mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/reline] Process insertion buffer forcibly
https://github.com/ruby/reline/commit/89d49ec9e0
This commit is contained in:
parent
c2bd5b84d0
commit
0cf073088e
2 changed files with 5 additions and 4 deletions
|
@ -324,6 +324,7 @@ class Reline::LineEditor
|
|||
|
||||
def rerender_all
|
||||
@rerender_all = true
|
||||
process_insert(force: true)
|
||||
rerender
|
||||
end
|
||||
|
||||
|
|
|
@ -6,7 +6,8 @@ begin
|
|||
class Reline::TestRendering < Yamatanooroti::TestCase
|
||||
def setup
|
||||
@pwd = Dir.pwd
|
||||
@tmpdir = File.join(File.expand_path(Dir.tmpdir), "test_reline_config_#{$$}")
|
||||
suffix = '%010d' % Random.rand(0..65535)
|
||||
@tmpdir = File.join(File.expand_path(Dir.tmpdir), "test_reline_config_#{$$}_#{suffix}")
|
||||
begin
|
||||
Dir.mkdir(@tmpdir)
|
||||
rescue Errno::EEXIST
|
||||
|
@ -429,15 +430,14 @@ begin
|
|||
LINES
|
||||
start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}, startup_message: 'Multiline REPL.')
|
||||
write("\e[200~,")
|
||||
write("def hoge\n 3\nend\n")
|
||||
write("def hoge\n 3\nend")
|
||||
write("\e[200~.")
|
||||
close
|
||||
assert_screen(<<~EOC)
|
||||
Multiline REPL.
|
||||
prompt> def hoge
|
||||
prompt> 3
|
||||
prompt> end
|
||||
=> :hoge
|
||||
prompt>
|
||||
EOC
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue