Skip to content

Commit

Permalink
fix: add unsaved changes warning for delete/backspace (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndd7xv authored Jul 30, 2023
1 parent 4536146 commit d161d6e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/windows/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ impl KeyHandler for Editor {
app.offset = app.offset.saturating_sub(1);
labels.update_all(&app.contents[app.offset..]);
adjust_offset(app, display, labels);
app.dirty = true;
}
}
fn delete(
Expand All @@ -168,6 +169,7 @@ impl KeyHandler for Editor {
app.actions.push(Action::Delete(app.offset, app.contents.remove(app.offset)));
labels.update_all(&app.contents[app.offset..]);
adjust_offset(app, display, labels);
app.dirty = true;
}
}
fn char(
Expand Down

0 comments on commit d161d6e

Please sign in to comment.