Skip to content

Commit

Permalink
Remove unnecessary condition
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed Aug 26, 2021
1 parent ccb70cc commit 07e911e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/reline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,11 @@ def readmultiline(prompt = '', add_hist = false, &confirm_multiline_termination)
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
Expand Down

0 comments on commit 07e911e

Please sign in to comment.