summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-10-04 22:40:35 +0900
committergit <svn-admin@ruby-lang.org>2021-10-05 22:33:07 +0900
commitf625645a37cd2c31f32078def8442598aff357f7 (patch)
tree39e52ed92a1a7a0089c0c8b86f3b0b9bbf871e49 /lib
parent2c2a017fe82b3079ae7936856afaaa680eac0ce6 (diff)
[ruby/reline] The width of block elements is 1 on Windows
https://github.com/ruby/reline/commit/5f4a75c7a0
Diffstat (limited to 'lib')
-rw-r--r--lib/reline/line_editor.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index d4a3e06a3d..106bb01214 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -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