summaryrefslogtreecommitdiff
path: root/src/completion.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-10-11 00:41:48 +0200
committerMaxime Coste <frrrwww@gmail.com>2012-10-11 00:41:48 +0200
commit0ce6bd9bf54332d9eed8c7462ab4dfe08f8fac95 (patch)
tree662591856f7227e3fb8592d582edaf2766a3f3e6 /src/completion.hh
parent571861bc7bbe10bf831b861f7e6e0a2aa0a40839 (diff)
use ByteCount instead of CharCount when we are really counting bytes
(that is most of the time when we are not concerned with displaying)
Diffstat (limited to 'src/completion.hh')
-rw-r--r--src/completion.hh12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/completion.hh b/src/completion.hh
index 60462975..cf626ec5 100644
--- a/src/completion.hh
+++ b/src/completion.hh
@@ -16,25 +16,25 @@ typedef std::vector<String> CandidateList;
struct Completions
{
CandidateList candidates;
- CharCount start;
- CharCount end;
+ ByteCount start;
+ ByteCount end;
Completions()
: start(0), end(0) {}
- Completions(CharCount start, CharCount end)
+ Completions(ByteCount start, ByteCount end)
: start(start), end(end) {}
};
CandidateList complete_filename(const Context& context,
const String& prefix,
- CharCount cursor_pos = -1);
+ ByteCount cursor_pos = -1);
typedef std::function<Completions (const Context&,
- const String&, CharCount)> Completer;
+ const String&, ByteCount)> Completer;
inline Completions complete_nothing(const Context& context,
- const String&, CharCount cursor_pos)
+ const String&, ByteCount cursor_pos)
{
return Completions(cursor_pos, cursor_pos);
}