next/previous buffer

This commit is contained in:
alice pellerin
2026-03-19 04:02:06 -05:00
parent 4f61f2fb93
commit 5908895ef9
4 changed files with 42 additions and 1 deletions
+9
View File
@@ -57,12 +57,18 @@ pub enum Action {
Redo,
Save,
PreviousBuffer,
NextBuffer,
}
// actions that act on the app as a whole, not just one buffer
pub enum AppAction {
QuitIfSaved,
Quit,
PreviousBuffer,
NextBuffer,
}
impl Buffer {
@@ -122,6 +128,9 @@ impl Buffer {
Action::Redo => self.redo(),
Action::Save => self.save(),
Action::PreviousBuffer => return Some(AppAction::PreviousBuffer),
Action::NextBuffer => return Some(AppAction::NextBuffer),
}
None