summaryrefslogtreecommitdiff
path: root/src/file.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-04-18 14:02:14 +0100
committerMaxime Coste <frrrwww@gmail.com>2014-04-18 14:02:14 +0100
commitadde2fef75b12bb9ce536341b87729ab2fc610fe (patch)
tree764dc9d71114d031b6a693b7cc277dd09d6c3e7f /src/file.cc
parentaf2d82dfc17ccd0c32b0955b1588e3bca379ccab (diff)
Use StringView for completion functions
Diffstat (limited to 'src/file.cc')
-rw-r--r--src/file.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/file.cc b/src/file.cc
index c295217f..c3df5f54 100644
--- a/src/file.cc
+++ b/src/file.cc
@@ -311,7 +311,7 @@ std::vector<String> list_files(const String& prefix,
return result.empty() ? subseq_result : result;
}
-std::vector<String> complete_filename(const String& prefix,
+std::vector<String> complete_filename(StringView prefix,
const Regex& ignored_regex,
ByteCount cursor_pos)
{
@@ -346,7 +346,7 @@ std::vector<String> complete_filename(const String& prefix,
return res;
}
-std::vector<String> complete_command(const String& prefix, ByteCount cursor_pos)
+std::vector<String> complete_command(StringView prefix, ByteCount cursor_pos)
{
String real_prefix = parse_filename(prefix.substr(0, cursor_pos));
String dirname;