name, they cannot be asking for completion on files. */
if (strcspn (text, gdb_completer_file_name_break_characters)
== text_len)
- fn_list = make_source_files_completion_list (text, text);
+ fn_list = make_source_files_completion_list (text);
}
if (!fn_list.empty () && !tracker.have_completions ())
the user cannot be asking for completion on files. */
if (strcspn (text, gdb_completer_file_name_break_characters)
== text_len)
- return make_source_files_completion_list (text, text);
+ return make_source_files_completion_list (text);
return {};
}
const char *source
= string_or_empty (explicit_loc->source_filename.get ());
completion_list matches
- = make_source_files_completion_list (source, source);
+ = make_source_files_completion_list (source);
tracker.add_completions (std::move (matches));
}
break;
program. */
completion_list
-make_source_files_completion_list (const char *text, const char *word)
+make_source_files_completion_list (const char *text)
{
size_t text_len = strlen (text);
completion_list list;
{
/* This file matches for a completion; add it to the current
list of matches. */
- add_filename_to_list (s->filename, text, word, &list);
+ add_filename_to_list (s->filename, text, text, &list);
}
else
{
if (base_name != s->filename
&& !filenames_seen.seen (base_name)
&& filename_ncmp (base_name, text, text_len) == 0)
- add_filename_to_list (base_name, text, word, &list);
+ add_filename_to_list (base_name, text, text, &list);
}
}
}
datum.filename_seen_cache = &filenames_seen;
datum.text = text;
- datum.word = word;
+ datum.word = text;
datum.text_len = text_len;
datum.list = &list;
map_symbol_filenames (datum, false /*need_fullname*/);
symbol_name_match_type name_match_type,
const char *, const char *, const char *);
-extern completion_list
- make_source_files_completion_list (const char *, const char *);
+extern completion_list make_source_files_completion_list (const char *);
/* Return whether SYM is a function/method, as opposed to a data symbol. */