1/*
2 SPDX-FileCopyrightText: KDE Developers
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef KATEVI_COMPLETIONREPLAYER_H
8#define KATEVI_COMPLETIONREPLAYER_H
9
10#include "completion.h"
11
12#include <QStack>
13
14namespace KTextEditor
15{
16class Cursor;
17}
18
19namespace KateVi
20{
21class InputModeManager;
22
23class CompletionReplayer
24{
25public:
26 explicit CompletionReplayer(InputModeManager *viInputModeManager);
27 ~CompletionReplayer();
28
29 void start(const CompletionList &completions);
30 void stop();
31
32 void replay();
33
34private:
35 Completion nextCompletion();
36 int findNextMergeableBracketPos(const KTextEditor::Cursor startPos) const;
37
38private:
39 InputModeManager *m_viInputModeManager;
40
41 QStack<CompletionList> m_CompletionsToReplay;
42 QStack<int> m_nextCompletionIndex;
43};
44
45}
46
47#endif // KATEVI_COMPLETIONREPLAYER_H
48

source code of ktexteditor/src/vimode/completionreplayer.h