From f13db4adde53299868b7523525e5aa2fe0a4b157 Mon Sep 17 00:00:00 2001 From: aycabta Date: Tue, 27 Aug 2019 05:33:27 +0900 Subject: Save value to @ambiguous_width because of a accessor --- lib/reline.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/reline.rb b/lib/reline.rb index d86c18d500..2f32f4c97c 100644 --- a/lib/reline.rb +++ b/lib/reline.rb @@ -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 -- cgit v1.2.3