fix build

gui
Blaž Hrastnik 2 years ago
parent ea6aa0795b
commit 86b1d970c2
No known key found for this signature in database
GPG Key ID: 1238B9C4AD889640

@ -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 @@ impl Application {
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 @@ impl EditorView {
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 @@ impl EditorView {
// 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…
Cancel
Save