mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/reline] Correct misalignment of scrollbar
https://github.com/ruby/reline/commit/7924b4cfc6
This commit is contained in:
parent
ec36ceb072
commit
03e9887d2e
1 changed files with 3 additions and 3 deletions
|
@ -680,11 +680,11 @@ class Reline::LineEditor
|
||||||
end
|
end
|
||||||
str = padding_space_with_escape_sequences(Reline::Unicode.take_range(item, 0, dialog.width), dialog.width)
|
str = padding_space_with_escape_sequences(Reline::Unicode.take_range(item, 0, dialog.width), dialog.width)
|
||||||
if dialog_render_info.scrollbar and dialog_render_info.contents.size > height
|
if dialog_render_info.scrollbar and dialog_render_info.contents.size > height
|
||||||
if position <= (i * 2) and (i * 2) <= (position + bar_height)
|
if position <= (i * 2) and (i * 2 + 1) < (position + bar_height)
|
||||||
str += '█'
|
str += '█'
|
||||||
elsif position <= (i * 2) and (i * 2 - 1) <= (position + bar_height)
|
elsif position <= (i * 2) and (i * 2) < (position + bar_height)
|
||||||
str += '▀'
|
str += '▀'
|
||||||
elsif position <= (i * 2 + 1) and (i * 2) <= (position + bar_height)
|
elsif position <= (i * 2 + 1) and (i * 2) < (position + bar_height)
|
||||||
str += '▄'
|
str += '▄'
|
||||||
else
|
else
|
||||||
str += ' '
|
str += ' '
|
||||||
|
|
Loading…
Reference in a new issue