mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/reline] Use Reline::Unicode.take_range to devide exactly by width
https://github.com/ruby/reline/commit/de1ad93f44
This commit is contained in:
parent
4f5166e790
commit
7afb5b8b95
1 changed files with 1 additions and 1 deletions
|
@ -652,7 +652,7 @@ class Reline::LineEditor
|
||||||
bg_color = '46'
|
bg_color = '46'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@output.write "\e[#{bg_color}m%-#{dialog.width}s\e[49m" % item.slice(0, dialog.width)
|
@output.write "\e[#{bg_color}m%-#{dialog.width}s\e[49m" % Reline::Unicode.take_range(item, 0, dialog.width)
|
||||||
Reline::IOGate.move_cursor_column(dialog.column)
|
Reline::IOGate.move_cursor_column(dialog.column)
|
||||||
move_cursor_down(1) if i < (dialog.contents.size - 1)
|
move_cursor_down(1) if i < (dialog.contents.size - 1)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue