From 436301b167d61cc8bb079c152dffa449075e7e18 Mon Sep 17 00:00:00 2001 From: Christian Stolz Date: Mon, 7 Oct 2024 21:33:26 +0200 Subject: [PATCH] Removed the matching bracket validator from editors Bumed version to 1.0.1. --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/cli/editor/filename_input_editor.rs | 12 ++---------- src/cli/editor/multiline_editor.rs | 4 ---- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4539b2b..240d09d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2136,7 +2136,7 @@ dependencies = [ [[package]] name = "rusty-buddy" -version = "1.0.0" +version = "1.0.1" dependencies = [ "async-openai", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 15ba26e..2dce747 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rusty-buddy" -version = "1.0.0" +version = "1.0.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/cli/editor/filename_input_editor.rs b/src/cli/editor/filename_input_editor.rs index 3c89b52..ae8658d 100644 --- a/src/cli/editor/filename_input_editor.rs +++ b/src/cli/editor/filename_input_editor.rs @@ -4,20 +4,14 @@ use crate::cli::style::configure_mad_skin; use rustyline::completion::FilenameCompleter; use rustyline::error::ReadlineError; use rustyline::highlight::{Highlighter, MatchingBracketHighlighter}; -use rustyline::hint::HistoryHinter; -use rustyline::validate::MatchingBracketValidator; -use rustyline::{Cmd, CompletionType, Config, EditMode, Editor, KeyEvent}; -use rustyline::{Completer, Helper, Hinter, Validator}; +use rustyline::{Cmd, CompletionType, Config, EditMode, Editor, KeyEvent, Validator}; +use rustyline::{Completer, Helper, Hinter}; #[derive(Helper, Completer, Hinter, Validator)] struct MyHelper { #[rustyline(Completer)] completer: FilenameCompleter, highlighter: MatchingBracketHighlighter, - #[rustyline(Validator)] - validator: MatchingBracketValidator, - #[rustyline(Hinter)] - hinter: HistoryHinter, colored_prompt: String, } @@ -56,9 +50,7 @@ pub fn get_filename_input(prompt: &str) -> Result