From 4db960c0a6f8afca87ac2b9e8d8ca2c7e03e9ae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Korn=C3=A9l=20Csernai?= <749306+csko@users.noreply.github.com> Date: Wed, 1 Feb 2023 12:46:47 -0800 Subject: [PATCH] use newer reedline (once available) (#7919) # Description Use newer reedline that fixes the code completion crash in https://github.com/nushell/nushell/issues/7885 by subtracting from the insertion point if the suggestion is shorter than the editor span. Closes https://github.com/nushell/nushell/issues/7885 Depends on https://github.com/nushell/reedline/pull/534 # User-Facing Changes # Tests + Formatting Tested in reedline. - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass # After Submitting If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. --------- Co-authored-by: sholderbach --- Cargo.lock | 3 +-- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 88ad12d8fb..85cce968f2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4153,8 +4153,7 @@ dependencies = [ [[package]] name = "reedline" version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da60f4ca4517626e4621dba4fb252069572d5bfaf41efb96dfa5c93f39f2e978" +source = "git+https://github.com/nushell/reedline.git?branch=main#829a1a9f491a04d7b4159bc69d46cfc8184ccf53" dependencies = [ "chrono", "crossterm 0.24.0", diff --git a/Cargo.toml b/Cargo.toml index 7ea7e688aa..6dda291683 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -147,7 +147,7 @@ path = "src/main.rs" # To use a development version of a dependency please use a global override here # changing versions in each sub-crate of the workspace is tedious [patch.crates-io] -# reedline = { git = "https://github.com/nushell/reedline.git", branch = "main" } +reedline = { git = "https://github.com/nushell/reedline.git", branch = "main" } # Criterion benchmarking setup # Run all benchmarks with `cargo bench`