Skip to content

Commit bf774c0

Browse files
committed
No need to check x > 0
Checked in the previous line.
1 parent a045668 commit bf774c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/reline/ansi.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,15 +266,15 @@ def self.move_cursor_column(x)
266266

267267
def self.move_cursor_up(x)
268268
if x > 0
269-
@@output.write "\e[#{x}A" if x > 0
269+
@@output.write "\e[#{x}A"
270270
elsif x < 0
271271
move_cursor_down(-x)
272272
end
273273
end
274274

275275
def self.move_cursor_down(x)
276276
if x > 0
277-
@@output.write "\e[#{x}B" if x > 0
277+
@@output.write "\e[#{x}B"
278278
elsif x < 0
279279
move_cursor_up(-x)
280280
end

0 commit comments

Comments
 (0)