CompilerExplorer: Fix undo

Fixes context handling for the Editor. This allows Undo/Redo actions to
activate correctly.

Change-Id: Ieb7fa27215f5746cf5f26e8e7b3b74f44023481c
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Marcus Tillmanns
2023-09-26 10:43:33 +02:00
parent 399e12c973
commit fe430bebbe
7 changed files with 187 additions and 84 deletions

View File

@@ -58,6 +58,9 @@ public:
void setCanUndoCallback(const Predicate &callback);
void setCanRedoCallback(const Predicate &callback);
using UnhandledCallback = std::function<void(Utils::Id commandId, Core::IEditor *editor)>;
void setUnhandledCallback(const UnhandledCallback &callback);
private:
Internal::TextEditorActionHandlerPrivate *d;
};