1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/reline] The width of block elements is 1 on Windows

https://github.com/ruby/reline/commit/5f4a75c7a0
This commit is contained in:
aycabta 2021-10-04 22:40:35 +09:00 committed by git
parent 2c2a017fe8
commit f625645a37

View file

@ -181,7 +181,11 @@ class Reline::LineEditor
Reline::IOGate.set_winch_handler do
@resized = true
end
@block_elem_width = Reline::Unicode.calculate_width('█')
if Reline::IOGate.win?
@block_elem_width = 1
else
@block_elem_width = Reline::Unicode.calculate_width('█')
end
end
def resize