mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-09-22 13:01:05 +03:00
Optimize bulk editor setup, deferred UI resources and Git plugin fixes
- Lazily compute document line hashes, avoid redundant multiline insertion
walks, and defer longest-line measurement for large or exceptionally long
text changes.
- Cache default code editor keybindings, reserve common command storage, and
create UIDiffView image viewers only when an image diff requires them.
- Keep cached screen positions coherent when descendants are queried before
dirty ancestors, and add regression coverage for ancestor movement.
- Relocate font-rendering golden images into the unit-test asset directory
and resolve image fixtures independently of the current working directory.
- Fix spurious status entries for files moved between directories. Preserve the suffix after Git's abbreviated brace notation when parsing renamed paths from numstat output. This prevents directory moves such as `bin/{ => unit_tests}/assets/...` from producing truncated synthetic untracked entries like `unit_tests`. Add regression coverage for staged files moved into a different directory.
- Git Plugin now remembers between sessions the uncommited commit message.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <eepp/graphics/image.hpp>
|
||||
#include <eepp/graphics/primitives.hpp>
|
||||
#include <eepp/scene/scenemanager.hpp>
|
||||
#include <eepp/system/base64.hpp>
|
||||
#include <eepp/system/filesystem.hpp>
|
||||
#include <eepp/system/luapattern.hpp>
|
||||
#include <eepp/system/scopedop.hpp>
|
||||
@@ -255,6 +256,12 @@ GitPlugin::~GitPlugin() {
|
||||
Sys::sleep( Milliseconds( 1.f ) );
|
||||
}
|
||||
|
||||
void GitPlugin::onSaveState( IniFile* state ) {
|
||||
std::string commitMessage;
|
||||
Base64::encode( mLastCommitMsg.toUtf8(), commitMessage );
|
||||
state->setValue( "git", "commit_message", commitMessage );
|
||||
}
|
||||
|
||||
void GitPlugin::runAsyncTask( std::function<void()> task ) {
|
||||
auto runningTasks = mRunningAsyncTasks;
|
||||
++*runningTasks;
|
||||
@@ -348,6 +355,12 @@ void GitPlugin::load( PluginManager* pluginManager ) {
|
||||
}
|
||||
}
|
||||
|
||||
std::string commitMessage;
|
||||
Base64::decode(
|
||||
getPluginContext()->getConfig().iniState.getValue( "git", "commit_message", "" ),
|
||||
commitMessage );
|
||||
mLastCommitMsg = String::fromUtf8( commitMessage );
|
||||
|
||||
if ( mKeyBindings.empty() ) {
|
||||
mKeyBindings["git-blame"] = "alt+shift+b";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user