[ruby/reline] No need to check x > 0
Checked in the previous line. https://github.com/ruby/reline/commit/bf774c0f2c
This commit is contained in:
parent
0b22e3e1df
commit
4d4716d939
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user