From: Jay Freeman (saurik) Date: Tue, 27 Apr 2010 21:16:58 +0000 (+0000) Subject: Allow auto-complete of ], which provides more intuitive support for terminated messages. X-Git-Tag: v0.9.432~56 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/763aa499559abaf1b4805f868a64d42642de3c34 Allow auto-complete of ], which provides more intuitive support for terminated messages. --- diff --git a/Console.cpp b/Console.cpp index 3fe2310..3035960 100644 --- a/Console.cpp +++ b/Console.cpp @@ -334,7 +334,14 @@ static char **Complete(const char *word, int start, int end) { CYString *string(dynamic_cast(element->value_)); _assert(string != NULL); - std::string completion(string->value_, string->size_); + std::string completion; + if (string->size_ != 0) + completion.assign(string->value_, string->size_); + else if (driver.mode_ == CYDriver::AutoMessage) + completion = "]"; + else + continue; + completions.push_back(completion); if (!rest) {