diff options
author | Lennon Donaghy <donaghylennon@gmail.com> | 2021-08-03 20:40:42 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-22 10:30:06 +0200 |
commit | 82b88c6e16b00db1b31da00e29964b75c539bbf2 (patch) | |
tree | e3e14d454df926a7e5cdfc0e5bd2c3af15e74cb4 /Userland/DevTools/HackStudio/EditorWrapper.h | |
parent | d454c63bde89c1d476981acb66d81fce14c11ebe (diff) | |
download | serenity-82b88c6e16b00db1b31da00e29964b75c539bbf2.zip |
HackStudio: Fix editor not marking file with unsaved changes as dirty
The editor's on_change callback was being overwritten in
HackStudioWidget.cpp in order to call update_gml_preview on every
change. This stopped the original callback from being called and marking
files as dirty when changed.
Now we call update_gml_preview in a new callback within the editor
wrapper, which is then called within the original on_change callback
in the editor.
Diffstat (limited to 'Userland/DevTools/HackStudio/EditorWrapper.h')
-rw-r--r-- | Userland/DevTools/HackStudio/EditorWrapper.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/DevTools/HackStudio/EditorWrapper.h b/Userland/DevTools/HackStudio/EditorWrapper.h index 67ed2c62ae..d4c422ac51 100644 --- a/Userland/DevTools/HackStudio/EditorWrapper.h +++ b/Userland/DevTools/HackStudio/EditorWrapper.h @@ -52,6 +52,8 @@ public: void update_diff(); Vector<Diff::Hunk> const& hunks() const { return m_hunks; } + Function<void()> on_change; + private: EditorWrapper(); |