Save value to @ambiguous_width because of a accessor
This commit is contained in:
parent
978ff1ff3a
commit
f13db4adde
@ -318,11 +318,11 @@ module Reline
|
|||||||
end
|
end
|
||||||
|
|
||||||
private def may_req_ambiguous_char_width
|
private def may_req_ambiguous_char_width
|
||||||
ambiguous_width = 2 if Reline::IOGate == Reline::GeneralIO or STDOUT.is_a?(File)
|
@ambiguous_width = 2 if Reline::IOGate == Reline::GeneralIO or STDOUT.is_a?(File)
|
||||||
return if ambiguous_width
|
return if @ambiguous_width
|
||||||
Reline::IOGate.move_cursor_column(0)
|
Reline::IOGate.move_cursor_column(0)
|
||||||
print "\u{25bd}"
|
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.move_cursor_column(0)
|
||||||
Reline::IOGate.erase_after_cursor
|
Reline::IOGate.erase_after_cursor
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user