mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 12:46:42 +01:00
sequencer: compact sidebar
This commit is contained in:
parent
a0109bce9b
commit
ea463db139
2 changed files with 64 additions and 16 deletions
|
|
@ -60,6 +60,14 @@ handle!(ArrangerRenameModal |self, e| {
|
|||
KeyCode::Right => {
|
||||
self.cursor = self.value.len().min(self.cursor + 1)
|
||||
},
|
||||
KeyCode::Backspace => {
|
||||
let last = self.value.len().saturating_sub(1);
|
||||
self.value = format!("{}{}",
|
||||
&self.value[0..self.cursor.min(last)],
|
||||
&self.value[self.cursor.min(last)..last]
|
||||
);
|
||||
self.cursor = self.cursor.saturating_sub(1)
|
||||
}
|
||||
KeyCode::Char(c) => {
|
||||
self.value.insert(self.cursor, c);
|
||||
self.cursor = self.value.len().min(self.cursor + 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue