summaryrefslogtreecommitdiffstats
path: root/akonadish/repl/replStates.cpp
diff options
context:
space:
mode:
authorAaron Seigo <aseigo@kde.org>2015-12-28 20:20:16 +0100
committerAaron Seigo <aseigo@kde.org>2015-12-28 20:20:16 +0100
commit7e48662cf11b5be7d062b082a9a1970419921a08 (patch)
tree26687262453b15285e963a06cb414faf30ef5f4e /akonadish/repl/replStates.cpp
parent949609b3f19b8a8823a7c62f23617eef05b796dd (diff)
downloadsink-7e48662cf11b5be7d062b082a9a1970419921a08.tar.gz
sink-7e48662cf11b5be7d062b082a9a1970419921a08.zip
pass the state object into the completer
allows completion to use an eventloop e.g.
Diffstat (limited to 'akonadish/repl/replStates.cpp')
-rw-r--r--akonadish/repl/replStates.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/akonadish/repl/replStates.cpp b/akonadish/repl/replStates.cpp
index 62888d0..55fdf39 100644
--- a/akonadish/repl/replStates.cpp
+++ b/akonadish/repl/replStates.cpp
@@ -156,7 +156,7 @@ static char *akonadi2_cli_next_tab_complete_match(const char *text, int state)
156 if (nearest.isEmpty()) { 156 if (nearest.isEmpty()) {
157 SyntaxTree::Command command = SyntaxTree::self()->match(tab_completion_full_state); 157 SyntaxTree::Command command = SyntaxTree::self()->match(tab_completion_full_state);
158 if (command.first && command.first->completer) { 158 if (command.first && command.first->completer) {
159 QStringList commandCompletions = command.first->completer(tab_completion_full_state, fragment); 159 QStringList commandCompletions = command.first->completer(tab_completion_full_state, fragment, SyntaxTree::self()->state());
160 if (commandCompletions.size() > state) { 160 if (commandCompletions.size() > state) {
161 return qstrdup(commandCompletions[state].toUtf8()); 161 return qstrdup(commandCompletions[state].toUtf8());
162 } 162 }