1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:07:35 +00:00

HackStudio: Migrate git-diff indicators to TextEditor API

As part of this, the CodeDocument now keeps track of the kind of
difference for each line. Previously, we iterated every hunk every time
the editor was painted, but now we do that once whenever the diff
changes, and then save the type of difference for each line.
This commit is contained in:
Sam Atkins 2023-03-15 11:33:18 +00:00 committed by Andreas Kling
parent 620bf45f43
commit 0761926127
5 changed files with 84 additions and 31 deletions

View file

@ -44,6 +44,8 @@ public:
void clear_execution_position();
void set_debug_mode(bool);
ErrorOr<void> update_git_diff_indicators();
CodeDocument const& code_document() const;
CodeDocument& code_document();
@ -125,6 +127,7 @@ private:
GutterIndicatorID m_breakpoint_indicator_id;
GutterIndicatorID m_execution_indicator_id;
GutterIndicatorID m_git_diff_indicator_id;
};
}