summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2019-08-27 05:33:27 +0900
committeraycabta <aycabta@gmail.com>2019-08-27 05:33:27 +0900
commitf13db4adde53299868b7523525e5aa2fe0a4b157 (patch)
tree4d58b0e7456c0bd99fa618699a6b863b8a2adea3
parent978ff1ff3a0db5455d591e151f212f4eff0f86c0 (diff)
Save value to @ambiguous_width because of a accessor
-rw-r--r--lib/reline.rb6
1 files 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