1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/reline] Remove unnecessary condition

07e911ec8e
This commit is contained in:
aycabta 2021-08-27 01:50:49 +09:00
parent fdc005e54e
commit 8e463e3e73

View file

@ -189,12 +189,11 @@ module Reline
end
pre, target, post= retrieve_completion_block(true)
if target.nil? or target.empty?
return nil
end
result = call_completion_proc_with_checking_args(pre, target, post)
if result and result.size == 1 and result[0] == target
result = nil
else
result = call_completion_proc_with_checking_args(pre, target, post)
if result and result.size == 1 and result[0] == target
result = nil
end
end
target_width = Reline::Unicode.calculate_width(target)
x = cursor_pos.x - target_width