fix build

This commit is contained in:
Blaž Hrastnik 2022-05-01 11:36:38 +09:00
parent ea6aa0795b
commit 86b1d970c2
No known key found for this signature in database
GPG Key ID: 1238B9C4AD889640
3 changed files with 5 additions and 5 deletions

View File

@ -51,7 +51,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;

View File

@ -80,7 +80,7 @@ pub fn new(args: Args) -> Result<Self, Error> {
let config = match std::fs::read_to_string(config_dir.join("config.toml")) {
Ok(config) => toml::from_str(&config)
.map(crate::keymap::merge_keys)
.map(crate::config::merge_keys)
.unwrap_or_else(|err| {
eprintln!("Bad config: {}", err);
eprintln!("Press <ENTER> to continue with default config");

View File

@ -359,9 +359,9 @@ pub fn render_text_highlights<H: Iterator<Item = HighlightEvent>>(
surface: &mut Surface,
theme: &Theme,
highlights: H,
whitespace: &helix_view::editor::WhitespaceConfig,
whitespace: &crate::editor::WhitespaceConfig,
) {
use helix_view::editor::WhitespaceRenderValue;
use crate::editor::WhitespaceRenderValue;
// It's slightly more efficient to produce a full RopeSlice from the Rope, then slice that a bunch
// of times than it is to always call Rope::slice/get_slice (it will internally always hit RSEnum::Light).
@ -455,7 +455,7 @@ pub fn render_text_highlights<H: Iterator<Item = HighlightEvent>>(
// 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 == " " {