Skip to content

Commit 07e911e

Browse files
committed
Remove unnecessary condition
1 parent ccb70cc commit 07e911e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/reline.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,11 @@ def readmultiline(prompt = '', add_hist = false, &confirm_multiline_termination)
189189
end
190190
pre, target, post= retrieve_completion_block(true)
191191
if target.nil? or target.empty?
192+
return nil
193+
end
194+
result = call_completion_proc_with_checking_args(pre, target, post)
195+
if result and result.size == 1 and result[0] == target
192196
result = nil
193-
else
194-
result = call_completion_proc_with_checking_args(pre, target, post)
195-
if result and result.size == 1 and result[0] == target
196-
result = nil
197-
end
198197
end
199198
target_width = Reline::Unicode.calculate_width(target)
200199
x = cursor_pos.x - target_width

0 commit comments

Comments
 (0)