mirror of
https://codeberg.org/unspeaker/perch.git
synced 2025-12-06 17:46:42 +01:00
edit the correct column
This commit is contained in:
parent
ac8e3dd198
commit
c3fbc6abf1
2 changed files with 40 additions and 29 deletions
|
|
@ -86,15 +86,15 @@ impl Taggart {
|
|||
self.editing = None;
|
||||
}
|
||||
pub fn edit_insert (&mut self, c: char) {
|
||||
if let Some((index, value)) = &mut self.editing {
|
||||
self.editing = Some((*index, format!("{value}{c}")));
|
||||
if let Some((edit_index, value)) = &mut self.editing {
|
||||
self.editing = Some((*edit_index, format!("{value}{c}")));
|
||||
}
|
||||
}
|
||||
pub fn edit_backspace (&mut self) {
|
||||
if let Some((index, value)) = &mut self.editing {
|
||||
if let Some((edit_index, value)) = &mut self.editing {
|
||||
let mut chars = value.chars();
|
||||
chars.next_back();
|
||||
self.editing = Some((*index, chars.as_str().into()));
|
||||
self.editing = Some((*edit_index, chars.as_str().into()));
|
||||
}
|
||||
}
|
||||
pub fn edit_delete (&mut self) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue