Editing starts to b real

This commit is contained in:
Jarkko Toivanen 2024-08-13 02:47:21 +03:00
parent 20b5c0735d
commit 5e5583897b

View file

@ -98,8 +98,8 @@ impl Nuudel {
self.cursory += 1; self.cursory += 1;
self.cursory = self.cursory.clamp(0, terminal::size()?.1-1); self.cursory = self.cursory.clamp(0, terminal::size()?.1-1);
}, },
KeyCode::Char(_) => { KeyCode::Char(char) => {
self.buffer.lines[usize::try_from(self.cursory).unwrap()].insert(self.cursorx.into(), 'A'); self.buffer.lines[usize::try_from(self.cursory).unwrap()].insert(self.cursorx.into(), char);
self.cursorx += 1; self.cursorx += 1;
}, },