From 763aa499559abaf1b4805f868a64d42642de3c34 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 27 Apr 2010 21:16:58 +0000 Subject: [PATCH] Allow auto-complete of ], which provides more intuitive support for terminated messages. --- Console.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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) { -- 2.49.0