mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
9cb7ba2f21
commit
bf1f6a696f
2 changed files with 19 additions and 0 deletions
|
@ -74,8 +74,14 @@ opt.on('--dialog VAL') { |v|
|
||||||
if v.include?('scrollbar')
|
if v.include?('scrollbar')
|
||||||
scrollbar = true
|
scrollbar = true
|
||||||
end
|
end
|
||||||
|
if v.include?('alt-scrollbar')
|
||||||
|
scrollbar = true
|
||||||
|
end
|
||||||
Reline::DialogRenderInfo.new(pos: cursor_pos, contents: contents, height: height, scrollbar: scrollbar)
|
Reline::DialogRenderInfo.new(pos: cursor_pos, contents: contents, height: height, scrollbar: scrollbar)
|
||||||
})
|
})
|
||||||
|
if v.include?('alt-scrollbar')
|
||||||
|
ENV['RELINE_ALT_SCROLLBAR'] = '1'
|
||||||
|
end
|
||||||
}
|
}
|
||||||
opt.on('--complete') {
|
opt.on('--complete') {
|
||||||
Reline.completion_proc = lambda { |target, preposing = nil, postposing = nil|
|
Reline.completion_proc = lambda { |target, preposing = nil, postposing = nil|
|
||||||
|
|
|
@ -1114,6 +1114,19 @@ begin
|
||||||
EOC
|
EOC
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_dialog_with_fullwidth_scrollbar
|
||||||
|
start_terminal(20, 40, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --dialog simple,scrollkey,alt-scrollbar}, startup_message: 'Multiline REPL.')
|
||||||
|
close
|
||||||
|
assert_screen(<<~'EOC')
|
||||||
|
Multiline REPL.
|
||||||
|
prompt>
|
||||||
|
Ruby is... ::
|
||||||
|
A dynamic, open source programming ::
|
||||||
|
language with a focus on simplicity''
|
||||||
|
and productivity. It has an elegant
|
||||||
|
EOC
|
||||||
|
end
|
||||||
|
|
||||||
def test_rerender_argument_prompt_after_pasting
|
def test_rerender_argument_prompt_after_pasting
|
||||||
start_terminal(20, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl}, startup_message: 'Multiline REPL.')
|
start_terminal(20, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl}, startup_message: 'Multiline REPL.')
|
||||||
write('abcdef')
|
write('abcdef')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue