206 |
206 |
207 if (completes.size() == 1) |
207 if (completes.size() == 1) |
208 { |
208 { |
209 m_interface->tabComplete(m_lastTabComplete, completes[0]); |
209 m_interface->tabComplete(m_lastTabComplete, completes[0]); |
210 } |
210 } |
211 else if (not completes.is_empty()) |
211 else if (completes.size() > 0) |
212 { |
212 { |
213 m_interface->print("Completions for '%s':\n", m_lastTabComplete.chars()); |
213 m_interface->print("Completions for '%s':\n", m_lastTabComplete.chars()); |
214 |
214 |
215 for (int i : range(0, completes.size(), 8)) |
215 for (int i : range(0, static_cast<int>(completes.size()), 8)) |
216 { |
216 { |
217 Range<int> spliceRange(i, min(i + 8, completes.size())); |
217 const int end = min(i + 8, static_cast<int>(completes.size())); |
218 StringList splice(completes.splice(spliceRange)); |
218 StringList splices = splice(completes, i, end); |
219 m_interface->print("- %s\n", splice.join(", ").chars()); |
219 m_interface->print("- %s\n", join_string_list(splices, ", ").chars()); |
220 } |
220 } |
221 } |
221 } |
222 } |
222 } |
223 break; |
223 break; |
224 } |
224 } |