mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-23 20:16:41 +02:00
feat: Make tui-logger use default-feature=false ✨
This commit is contained in:
parent
265ecd85c7
commit
0be6170939
3 changed files with 6 additions and 93 deletions
42
Cargo.lock
generated
42
Cargo.lock
generated
|
@ -999,12 +999,6 @@ dependencies = [
|
|||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "numtoa"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef"
|
||||
|
||||
[[package]]
|
||||
name = "object"
|
||||
version = "0.32.0"
|
||||
|
@ -1280,15 +1274,6 @@ dependencies = [
|
|||
"bitflags 1.3.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_termios"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8440d8acb4fd3d277125b4bd01a6f38aee8d814b3b5fc09b3f2b825d37d3fe8f"
|
||||
dependencies = [
|
||||
"redox_syscall 0.2.16",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_users"
|
||||
version = "0.4.3"
|
||||
|
@ -1723,18 +1708,6 @@ dependencies = [
|
|||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "termion"
|
||||
version = "1.5.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "077185e2eac69c3f8379a4298e1e07cd36beb962290d4a51199acf0fdc10607e"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"numtoa",
|
||||
"redox_syscall 0.2.16",
|
||||
"redox_termios",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "1.0.47"
|
||||
|
@ -1934,19 +1907,6 @@ dependencies = [
|
|||
"tracing-log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tui"
|
||||
version = "0.19.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ccdd26cbd674007e649a272da4475fb666d3aa0ad0531da7136db6fab0e5bad1"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"cassowary",
|
||||
"termion",
|
||||
"unicode-segmentation",
|
||||
"unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tui-input"
|
||||
version = "0.8.0"
|
||||
|
@ -1969,10 +1929,8 @@ dependencies = [
|
|||
"log",
|
||||
"parking_lot",
|
||||
"ratatui 0.22.0",
|
||||
"termion",
|
||||
"tracing",
|
||||
"tracing-subscriber",
|
||||
"tui",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
@ -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"
|
||||
|
|
55
src/app.rs
55
src/app.rs
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue