Skip to content

Commit

Permalink
Delegate more controls to tui-input
Browse files Browse the repository at this point in the history
  • Loading branch information
YS-L committed Jan 1, 2024
1 parent df876e0 commit 7aaf9fe
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,6 @@ impl InputHandler {
BufferState::Active(input) => input,
BufferState::Inactive => return Control::Nothing,
};
// SHIFT needed to capture capitalised characters
if key_event.modifiers != KeyModifiers::NONE && key_event.modifiers != KeyModifiers::SHIFT {
return Control::Nothing;
}
if self.mode == InputMode::Option {
return self.handler_buffering_option_mode(key_event);
}
Expand Down
2 changes: 1 addition & 1 deletion src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ impl<'a> CsvTable<'a> {
fn format_input(&self, input: &Input) -> String {
let chars_before: String = input.value().chars().take(input.cursor()).collect();
let chars_after: String = input.value().chars().skip(input.cursor()).collect();
format!("{chars_before}{chars_after}")
format!("{chars_before}{chars_after}")
}

fn render_status(&self, area: Rect, buf: &mut Buffer, state: &mut CsvTableState) {
Expand Down

0 comments on commit 7aaf9fe

Please sign in to comment.