Merge branch 'main' into worktree-improvise-ewi-formula-crate
# Conflicts: # src/ui/app.rs # src/ui/effect.rs # src/view/layout.rs
This commit is contained in:
@ -197,13 +197,18 @@ impl Cmd for EnterEditMode {
|
||||
fn name(&self) -> &'static str {
|
||||
"enter-edit-mode"
|
||||
}
|
||||
fn execute(&self, _ctx: &CmdContext) -> Vec<Box<dyn Effect>> {
|
||||
fn execute(&self, ctx: &CmdContext) -> Vec<Box<dyn Effect>> {
|
||||
let edit_mode = if ctx.mode.is_records() {
|
||||
AppMode::records_editing()
|
||||
} else {
|
||||
AppMode::editing()
|
||||
};
|
||||
vec![
|
||||
Box::new(effect::SetBuffer {
|
||||
name: "edit".to_string(),
|
||||
value: self.initial_value.clone(),
|
||||
}),
|
||||
effect::change_mode(AppMode::editing()),
|
||||
effect::change_mode(edit_mode),
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user