mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-22 05:40:43 +08:00
enhance: remember commit message when exiting (#1166)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -464,6 +464,7 @@ namespace SourceGit.ViewModels
|
||||
_selectedView = _histories;
|
||||
_selectedViewIndex = 0;
|
||||
|
||||
_workingCopy.CommitMessage = _settings.LastCommitMessage;
|
||||
_autoFetchTimer = new Timer(AutoFetchImpl, null, 5000, 5000);
|
||||
RefreshAll();
|
||||
}
|
||||
@@ -471,6 +472,7 @@ namespace SourceGit.ViewModels
|
||||
public void Close()
|
||||
{
|
||||
SelectedView = null; // Do NOT modify. Used to remove exists widgets for GC.Collect
|
||||
_settings.LastCommitMessage = _workingCopy.CommitMessage;
|
||||
|
||||
var settingsSerialized = JsonSerializer.Serialize(_settings, JsonCodeGen.Default.RepositorySettings);
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user