summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorima1zumi <mariimaizumi5@gmail.com>2021-11-17 23:10:45 +0900
committergit <svn-admin@ruby-lang.org>2021-12-03 00:39:30 +0900
commit4d4716d939ad8cb288a503e97c73ed8cfbc12348 (patch)
treeac7f05a842cb29746ceb4f8d6d2b8ffe68d6f74b
parent0b22e3e1dfb4f03cae4c5fc79d5f9e86cf7f835d (diff)
[ruby/reline] No need to check `x > 0`
Checked in the previous line. https://github.com/ruby/reline/commit/bf774c0f2c
-rw-r--r--lib/reline/ansi.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/reline/ansi.rb b/lib/reline/ansi.rb
index 3a4ac42050..c564873241 100644
--- a/lib/reline/ansi.rb
+++ b/lib/reline/ansi.rb
@@ -277,7 +277,7 @@ class Reline::ANSI
def self.move_cursor_up(x)
if x > 0
- @@output.write "\e[#{x}A" if x > 0
+ @@output.write "\e[#{x}A"
elsif x < 0
move_cursor_down(-x)
end
@@ -285,7 +285,7 @@ class Reline::ANSI
def self.move_cursor_down(x)
if x > 0
- @@output.write "\e[#{x}B" if x > 0
+ @@output.write "\e[#{x}B"
elsif x < 0
move_cursor_up(-x)
end