Skip to content

Commit

Permalink
The width of block elements is 1 on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed Oct 4, 2021
1 parent c595895 commit 5f4a75c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/reline/line_editor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,11 @@ def reset(prompt = '', encoding:)
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
Expand Down

0 comments on commit 5f4a75c

Please sign in to comment.