summaryrefslogtreecommitdiff
path: root/src/command_manager.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/command_manager.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/command_manager.hh')
-rw-r--r--src/command_manager.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/command_manager.hh b/src/command_manager.hh
index 84f764ee..454ff95e 100644
--- a/src/command_manager.hh
+++ b/src/command_manager.hh
@@ -28,13 +28,13 @@ typedef std::function<void (const CommandParameters&,
typedef std::function<CandidateList (const Context& context,
const CommandParameters&,
- size_t, CharCount)> CommandCompleter;
+ size_t, ByteCount)> CommandCompleter;
class PerArgumentCommandCompleter
{
public:
typedef std::function<CandidateList (const Context&,
- const String&, CharCount)> ArgumentCompleter;
+ const String&, ByteCount)> ArgumentCompleter;
typedef memoryview<ArgumentCompleter> ArgumentCompleterList;
PerArgumentCommandCompleter(const ArgumentCompleterList& completers)
@@ -43,7 +43,7 @@ public:
CandidateList operator()(const Context& context,
const CommandParameters& params,
size_t token_to_complete,
- CharCount pos_in_token) const;
+ ByteCount pos_in_token) const;
private:
std::vector<ArgumentCompleter> m_completers;
@@ -57,7 +57,7 @@ public:
const EnvVarMap& env_vars = {});
Completions complete(const Context& context,
- const String& command_line, CharCount cursor_pos);
+ const String& command_line, ByteCount cursor_pos);
bool command_defined(const String& command_name) const;