Update to ropey 1.5

pull/2611/head
Blaž Hrastnik 2 years ago
parent 5ed6223990
commit 370a16d0f0
No known key found for this signature in database
GPG Key ID: 1238B9C4AD889640

9
Cargo.lock generated

@ -457,7 +457,6 @@ dependencies = [
"once_cell",
"pulldown-cmark",
"retain_mut",
"ropey",
"serde",
"serde_json",
"signal-hook",
@ -835,9 +834,9 @@ checksum = "4389f1d5789befaf6029ebd9f7dac4af7f7e3d61b69d4f30e2ac02b57e7712b0"
[[package]]
name = "ropey"
version = "1.4.1"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa0dd9b26e2a102b33d400b7b7d196c81a4014eb96eda90b1c5b48d7215d9633"
checksum = "bbd22239fafefc42138ca5da064f3c17726a80d2379d817a3521240e78dd0064"
dependencies = [
"smallvec",
"str_indices",
@ -1016,9 +1015,9 @@ checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0"
[[package]]
name = "str_indices"
version = "0.3.2"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adfad63a1b47951101cd667a85b2959a62910cf03f814fff25df89c460b873f8"
checksum = "9d9199fa80c817e074620be84374a520062ebac833f358d74b37060ce4a0f2c0"
[[package]]
name = "syn"

@ -16,7 +16,7 @@ unicode-lines = ["ropey/unicode_lines"]
[dependencies]
helix-loader = { version = "0.6", path = "../helix-loader" }
ropey = { version = "1.4", default-features = false }
ropey = { version = "1.5", default-features = false, features = ["simd"] }
smallvec = "1.8"
smartstring = "1.0.1"
unicode-segmentation = "1.9"

@ -52,7 +52,7 @@ pub fn find_root(root: Option<&str>, root_markers: &[String]) -> Option<std::pat
.cloned()
}
pub use ropey::{Rope, RopeBuilder, RopeSlice};
pub use ropey::{str_utils, Rope, RopeBuilder, RopeSlice};
// pub use tendril::StrTendril as Tendril;
pub use smartstring::SmartString;

@ -33,7 +33,6 @@ anyhow = "1"
once_cell = "1.12"
which = "4.2"
ropey = { version = "1.4", default-features = false }
tokio = { version = "1", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot"] }
tui = { path = "../helix-tui", package = "helix-tui", default-features = false, features = ["crossterm"] }

@ -467,7 +467,7 @@ impl EditorView {
// make sure we display tab as appropriate amount of spaces
let visual_tab_width = tab_width - (visual_x as usize % tab_width);
let grapheme_tab_width =
ropey::str_utils::char_to_byte_idx(&tab, visual_tab_width);
helix_core::str_utils::char_to_byte_idx(&tab, visual_tab_width);
(&tab[..grapheme_tab_width], visual_tab_width)
} else if grapheme == " " {

Loading…
Cancel
Save