diff options
-rw-r--r-- | Userland/DevTools/HackStudio/Editor.cpp | 2 | ||||
-rw-r--r-- | Userland/DevTools/HackStudio/Editor.h | 3 | ||||
-rw-r--r-- | Userland/Libraries/LibGUI/TextEditor.h | 4 |
3 files changed, 4 insertions, 5 deletions
diff --git a/Userland/DevTools/HackStudio/Editor.cpp b/Userland/DevTools/HackStudio/Editor.cpp index 10c56ea5d8..b6430087ee 100644 --- a/Userland/DevTools/HackStudio/Editor.cpp +++ b/Userland/DevTools/HackStudio/Editor.cpp @@ -488,7 +488,7 @@ void Editor::LanguageServerAidedAutocompleteProvider::provide_completions(Functi data.value().position.column()); } -void Editor::on_edit_action(const GUI::Command& command) +void Editor::will_execute(GUI::TextDocumentUndoCommand const& command) { if (!m_language_client) return; diff --git a/Userland/DevTools/HackStudio/Editor.h b/Userland/DevTools/HackStudio/Editor.h index 1e5b197c20..036287f97b 100644 --- a/Userland/DevTools/HackStudio/Editor.h +++ b/Userland/DevTools/HackStudio/Editor.h @@ -41,8 +41,7 @@ public: CodeDocument& code_document(); virtual void set_document(GUI::TextDocument&) override; - - virtual void on_edit_action(const GUI::Command&) override; + virtual void will_execute(GUI::TextDocumentUndoCommand const&) override; virtual void undo() override; virtual void redo() override; diff --git a/Userland/Libraries/LibGUI/TextEditor.h b/Userland/Libraries/LibGUI/TextEditor.h index 7c6f4b8978..7a4d14eba3 100644 --- a/Userland/Libraries/LibGUI/TextEditor.h +++ b/Userland/Libraries/LibGUI/TextEditor.h @@ -285,12 +285,12 @@ private: { auto command = make<T>(*m_document, forward<Args>(args)...); command->perform_formatting(*this); - on_edit_action(*command); + will_execute(*command); command->execute_from(*this); m_document->add_to_undo_stack(move(command)); } - virtual void on_edit_action(const Command&) { } + virtual void will_execute(TextDocumentUndoCommand const&) { } Type m_type { MultiLine }; Mode m_mode { Editable }; |