summaryrefslogtreecommitdiff
path: root/lib/reline.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/reline.rb')
-rw-r--r--lib/reline.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/reline.rb b/lib/reline.rb
index 91648bf447..a3f37d1ab0 100644
--- a/lib/reline.rb
+++ b/lib/reline.rb
@@ -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