mirror of https://github.com/odrling/Aegisub
Allow coalescing undo over autosaves
This commit is contained in:
parent
52dbb482af
commit
c8d02de3db
|
@ -313,7 +313,7 @@ void SubsController::OnCommit(AssFileCommit c) {
|
||||||
commit_id = next_commit_id++;
|
commit_id = next_commit_id++;
|
||||||
// Allow coalescing only if it's the last change and the file has not been
|
// Allow coalescing only if it's the last change and the file has not been
|
||||||
// saved since the last change
|
// saved since the last change
|
||||||
if (commit_id == *c.commit_id+1 && redo_stack.empty() && saved_commit_id+1 != commit_id && autosaved_commit_id+1 != commit_id) {
|
if (commit_id == *c.commit_id+1 && redo_stack.empty() && saved_commit_id+1 != commit_id) {
|
||||||
// If only one line changed just modify it instead of copying the file
|
// If only one line changed just modify it instead of copying the file
|
||||||
if (c.single_line && c.single_line->Group() == AssEntryGroup::DIALOGUE) {
|
if (c.single_line && c.single_line->Group() == AssEntryGroup::DIALOGUE) {
|
||||||
for (auto& diag : undo_stack.back().events) {
|
for (auto& diag : undo_stack.back().events) {
|
||||||
|
|
Loading…
Reference in New Issue