Skip to content

Commit

Permalink
feat: Make tui-logger use default-feature=false ✨
Browse files Browse the repository at this point in the history
  • Loading branch information
kdheepak committed Sep 3, 2023
1 parent 265ecd8 commit 0be6170
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 93 deletions.
42 changes: 0 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ tracing = "0.1.37"
tracing-error = "0.2.0"
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
tui-input = "0.8.0"
tui-logger = { version = "0.9.5", features = ["ratatui-support", "tracing-support"] }
tui-logger = { version = "0.9.5", default-features = false, features = ["ratatui-support", "tracing-support"] }
unicode-segmentation = "1.10.1"
unicode-truncate = "0.2.0"
unicode-width = "0.1.10"
Expand Down
55 changes: 5 additions & 50 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ use ratatui::{
use regex::Regex;
use rustyline::{history::SearchDirection as HistoryDirection, At, Editor, Word};
use task_hookrs::{date::Date, import::import, project::Project, status::TaskStatus, task::Task};
use tui_input::backend::crossterm::EventHandler;
use tui_input::Input;
use tui_input::{backend::crossterm::EventHandler, Input};
use unicode_segmentation::{Graphemes, UnicodeSegmentation};
use unicode_width::UnicodeWidthStr;
use uuid::Uuid;
Expand Down Expand Up @@ -3641,54 +3640,10 @@ impl TaskwarriorTui {
}

pub fn handle_movement(linebuffer: &mut Input, input: KeyCode, changes: &mut utils::Changeset) {
match input {
// KeyCode::Ctrl('f') | KeyCode::Right => {
// linebuffer.move_forward(1);
// }
// KeyCode::Ctrl('b') | KeyCode::Left => {
// linebuffer.move_backward(1);
// }
// KeyCode::Ctrl('h') | KeyCode::Backspace => {
// linebuffer.backspace(1, changes);
// }
// KeyCode::Ctrl('d') | KeyCode::Delete => {
// linebuffer.delete(1, changes);
// }
// KeyCode::Ctrl('a') | KeyCode::Home => {
// linebuffer.move_home();
// }
// KeyCode::Ctrl('e') | KeyCode::End => {
// linebuffer.move_end();
// }
// KeyCode::Ctrl('k') => {
// linebuffer.kill_line(changes);
// }
// KeyCode::Ctrl('u') => {
// linebuffer.discard_line(changes);
// }
// KeyCode::Ctrl('w') | KeyCode::AltBackspace | KeyCode::CtrlBackspace => {
// linebuffer.delete_prev_word(Word::Emacs, 1, changes);
// }
// KeyCode::Alt('d') | KeyCode::AltDelete | KeyCode::CtrlDelete => {
// linebuffer.delete_word(At::AfterEnd, Word::Emacs, 1, changes);
// }
// KeyCode::Alt('f') => {
// linebuffer.move_to_next_word(At::AfterEnd, Word::Emacs, 1);
// }
// KeyCode::Alt('b') => {
// linebuffer.move_to_prev_word(Word::Emacs, 1);
// }
// KeyCode::Alt('t') => {
// linebuffer.transpose_words(1, changes);
// }
KeyCode::Char(c) => {
linebuffer.handle_event(&crossterm::event::Event::Key(crossterm::event::KeyEvent::new(
input,
KeyModifiers::empty(),
)));
}
_ => {}
}
linebuffer.handle_event(&crossterm::event::Event::Key(crossterm::event::KeyEvent::new(
input,
KeyModifiers::empty(),
)));
}

pub fn add_tag(task: &mut Task, tag: String) {
Expand Down

0 comments on commit 0be6170

Please sign in to comment.