mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[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
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue