Skip to content

Commit

Permalink
Handle space key (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmoulton authored Aug 27, 2023
1 parent 61bbed4 commit cd17ce1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/views/text_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,11 @@ impl TextInput {
.update(|buf| buf.insert_str(self.cursor_glyph_idx, &ch.clone()));
self.move_cursor(Movement::Glyph, Direction::Right)
}
Key::Space => {
self.buffer
.update(|buf| buf.insert(self.cursor_glyph_idx, ' '));
self.move_cursor(Movement::Glyph, Direction::Right)
}
Key::Backspace => {
let selection = self.selection.clone();
if selection != (0..0) {
Expand Down

0 comments on commit cd17ce1

Please sign in to comment.