mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-16 07:20:46 +00:00
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.
This commit is contained in:
parent
d454c63bde
commit
82b88c6e16
Notes:
sideshowbarker
2024-07-18 05:23:45 +09:00
Author: https://github.com/donaghylennon
Commit: 82b88c6e16
Pull-request: https://github.com/SerenityOS/serenity/pull/9185
Reviewed-by: https://github.com/itamar8910 ✅
3 changed files with 6 additions and 2 deletions
|
@ -52,6 +52,8 @@ public:
|
|||
void update_diff();
|
||||
Vector<Diff::Hunk> const& hunks() const { return m_hunks; }
|
||||
|
||||
Function<void()> on_change;
|
||||
|
||||
private:
|
||||
EditorWrapper();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue