File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -1165,7 +1165,13 @@ def input_key(key)
1165
1165
1166
1166
def call_completion_proc
1167
1167
result = retrieve_completion_block ( true )
1168
- preposing , target , postposing = result
1168
+ pre , target , post = result
1169
+ result = call_completion_proc_with_checking_args ( pre , target , post )
1170
+ Reline . core . instance_variable_set ( :@completion_quote_character , nil )
1171
+ result
1172
+ end
1173
+
1174
+ private def call_completion_proc_with_checking_args ( pre , target , post )
1169
1175
if @completion_proc and target
1170
1176
argnum = @completion_proc . parameters . inject ( 0 ) { |result , item |
1171
1177
case item . first
@@ -1179,12 +1185,11 @@ def call_completion_proc
1179
1185
when 1
1180
1186
result = @completion_proc . ( target )
1181
1187
when 2
1182
- result = @completion_proc . ( target , preposing )
1188
+ result = @completion_proc . ( target , pre )
1183
1189
when 3 ..Float ::INFINITY
1184
- result = @completion_proc . ( target , preposing , postposing )
1190
+ result = @completion_proc . ( target , pre , post )
1185
1191
end
1186
1192
end
1187
- Reline . core . instance_variable_set ( :@completion_quote_character , nil )
1188
1193
result
1189
1194
end
1190
1195
You can’t perform that action at this time.
0 commit comments