mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
a2f55679f0
commit
374b15a84a
2 changed files with 30 additions and 0 deletions
|
@ -709,6 +709,10 @@ class Reline::LineEditor
|
||||||
end
|
end
|
||||||
Reline::IOGate.hide_cursor
|
Reline::IOGate.hide_cursor
|
||||||
dialog.width += @block_elem_width if dialog.scrollbar_pos
|
dialog.width += @block_elem_width if dialog.scrollbar_pos
|
||||||
|
if dialog.column < 0
|
||||||
|
dialog.column = 0
|
||||||
|
dialog.width = @screen_size.last
|
||||||
|
end
|
||||||
reset_dialog(dialog, old_dialog)
|
reset_dialog(dialog, old_dialog)
|
||||||
move_cursor_down(dialog.vertical_offset)
|
move_cursor_down(dialog.vertical_offset)
|
||||||
Reline::IOGate.move_cursor_column(dialog.column)
|
Reline::IOGate.move_cursor_column(dialog.column)
|
||||||
|
|
|
@ -1072,6 +1072,32 @@ begin
|
||||||
EOC
|
EOC
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_dialog_narrower_than_screen
|
||||||
|
start_terminal(20, 11, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete-long}, startup_message: 'Multiline REPL.')
|
||||||
|
write('S' + "\C-i" * 3)
|
||||||
|
close
|
||||||
|
assert_screen(<<~'EOC')
|
||||||
|
Multiline R
|
||||||
|
EPL.
|
||||||
|
prompt> Sym
|
||||||
|
String
|
||||||
|
Struct █
|
||||||
|
Symbol █
|
||||||
|
StopIterat█
|
||||||
|
SystemCall█
|
||||||
|
SystemExit█
|
||||||
|
SystemStac█
|
||||||
|
ScriptErro█
|
||||||
|
SyntaxErro█
|
||||||
|
Signal █
|
||||||
|
SizedQueue█
|
||||||
|
Set
|
||||||
|
SecureRand
|
||||||
|
Socket
|
||||||
|
StringIO
|
||||||
|
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