mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:57:35 +00:00
HackStudio: Indicate git changes in the editor's gutter
"+" for added lines, "!" for changed, "-" for removed.
This commit is contained in:
parent
8501617fcb
commit
d5828dbecb
4 changed files with 71 additions and 0 deletions
|
@ -7,9 +7,12 @@
|
|||
#pragma once
|
||||
|
||||
#include "Debugger/BreakpointCallback.h"
|
||||
#include "Git/GitRepo.h"
|
||||
#include "LanguageClient.h"
|
||||
#include <AK/Function.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibDiff/Hunks.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@ -40,6 +43,14 @@ public:
|
|||
const String& filename() const { return m_filename; }
|
||||
bool document_dirty() const { return m_document_dirty; }
|
||||
|
||||
LexicalPath const& project_root() const { return m_project_root; }
|
||||
void set_project_root(LexicalPath const& project_root);
|
||||
|
||||
GitRepo const* git_repo() const { return m_git_repo; }
|
||||
|
||||
void update_diff();
|
||||
Vector<Diff::Hunk> const& hunks() const { return m_hunks; }
|
||||
|
||||
private:
|
||||
EditorWrapper();
|
||||
|
||||
|
@ -50,6 +61,10 @@ private:
|
|||
RefPtr<GUI::Label> m_cursor_label;
|
||||
RefPtr<Editor> m_editor;
|
||||
bool m_document_dirty { false };
|
||||
|
||||
LexicalPath m_project_root;
|
||||
RefPtr<GitRepo> m_git_repo;
|
||||
Vector<Diff::Hunk> m_hunks;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue