mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 01:16:18 +04:00
fix build
This commit is contained in:
parent
ea6aa0795b
commit
86b1d970c2
@ -51,7 +51,7 @@ pub fn find_root(root: Option<&str>, root_markers: &[String]) -> Option<std::pat
|
|||||||
.cloned()
|
.cloned()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub use ropey::{Rope, RopeBuilder, RopeSlice};
|
pub use ropey::{str_utils, Rope, RopeBuilder, RopeSlice};
|
||||||
|
|
||||||
// pub use tendril::StrTendril as Tendril;
|
// pub use tendril::StrTendril as Tendril;
|
||||||
pub use smartstring::SmartString;
|
pub use smartstring::SmartString;
|
||||||
|
@ -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")) {
|
let config = match std::fs::read_to_string(config_dir.join("config.toml")) {
|
||||||
Ok(config) => toml::from_str(&config)
|
Ok(config) => toml::from_str(&config)
|
||||||
.map(crate::keymap::merge_keys)
|
.map(crate::config::merge_keys)
|
||||||
.unwrap_or_else(|err| {
|
.unwrap_or_else(|err| {
|
||||||
eprintln!("Bad config: {}", err);
|
eprintln!("Bad config: {}", err);
|
||||||
eprintln!("Press <ENTER> to continue with default config");
|
eprintln!("Press <ENTER> to continue with default config");
|
||||||
|
@ -359,9 +359,9 @@ pub fn render_text_highlights<H: Iterator<Item = HighlightEvent>>(
|
|||||||
surface: &mut Surface,
|
surface: &mut Surface,
|
||||||
theme: &Theme,
|
theme: &Theme,
|
||||||
highlights: H,
|
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
|
// 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).
|
// 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
|
// make sure we display tab as appropriate amount of spaces
|
||||||
let visual_tab_width = tab_width - (visual_x as usize % tab_width);
|
let visual_tab_width = tab_width - (visual_x as usize % tab_width);
|
||||||
let grapheme_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)
|
(&tab[..grapheme_tab_width], visual_tab_width)
|
||||||
} else if grapheme == " " {
|
} else if grapheme == " " {
|
||||||
|
Loading…
Reference in New Issue
Block a user