Save value to @ambiguous_width because of a accessor

This commit is contained in:
aycabta 2019-08-27 05:33:27 +09:00
parent 978ff1ff3a
commit f13db4adde

View File

@ -318,11 +318,11 @@ module Reline
end
private def may_req_ambiguous_char_width
ambiguous_width = 2 if Reline::IOGate == Reline::GeneralIO or STDOUT.is_a?(File)
return if ambiguous_width
@ambiguous_width = 2 if Reline::IOGate == Reline::GeneralIO or STDOUT.is_a?(File)
return if @ambiguous_width
Reline::IOGate.move_cursor_column(0)
print "\u{25bd}"
ambiguous_width = Reline::IOGate.cursor_pos.x
@ambiguous_width = Reline::IOGate.cursor_pos.x
Reline::IOGate.move_cursor_column(0)
Reline::IOGate.erase_after_cursor
end