mirror of https://github.com/helix-editor/helix
fix formatting
parent
42c9997487
commit
fe4d6ceb40
|
@ -3550,7 +3550,6 @@ pub mod insert {
|
||||||
indent,
|
indent,
|
||||||
);
|
);
|
||||||
doc.apply(&transaction, view.id);
|
doc.apply(&transaction, view.id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn smart_tab(cx: &mut Context) {
|
pub fn smart_tab(cx: &mut Context) {
|
||||||
|
|
|
@ -2933,7 +2933,7 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
|
||||||
fun: clear_register,
|
fun: clear_register,
|
||||||
signature: CommandSignature::none(),
|
signature: CommandSignature::none(),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
pub static TYPABLE_COMMAND_MAP: Lazy<HashMap<&'static str, &'static TypableCommand>> =
|
pub static TYPABLE_COMMAND_MAP: Lazy<HashMap<&'static str, &'static TypableCommand>> =
|
||||||
Lazy::new(|| {
|
Lazy::new(|| {
|
||||||
|
|
|
@ -6,7 +6,7 @@ use helix_core::str_utils::char_to_byte_idx;
|
||||||
use helix_core::syntax::Highlight;
|
use helix_core::syntax::Highlight;
|
||||||
use helix_core::syntax::HighlightEvent;
|
use helix_core::syntax::HighlightEvent;
|
||||||
use helix_core::text_annotations::TextAnnotations;
|
use helix_core::text_annotations::TextAnnotations;
|
||||||
use helix_core::{visual_offset_from_block, Position, RopeSlice, Range};
|
use helix_core::{visual_offset_from_block, Position, Range, RopeSlice};
|
||||||
use helix_view::editor::{WhitespaceConfig, WhitespaceRenderValue};
|
use helix_view::editor::{WhitespaceConfig, WhitespaceRenderValue};
|
||||||
use helix_view::graphics::Rect;
|
use helix_view::graphics::Rect;
|
||||||
use helix_view::theme::Style;
|
use helix_view::theme::Style;
|
||||||
|
@ -73,7 +73,6 @@ impl<H: Iterator<Item = HighlightEvent>> Iterator for StyleIter<'_, H> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// A wrapper around a HighlightIterator
|
/// A wrapper around a HighlightIterator
|
||||||
/// that merges the layered highlights to create the final text style
|
/// that merges the layered highlights to create the final text style
|
||||||
/// and yields the active text style and the char_idx where the active
|
/// and yields the active text style and the char_idx where the active
|
||||||
|
@ -89,12 +88,11 @@ impl<H: Iterator<Item = (Range, Style)>> Iterator for RawStyleIter<'_, H> {
|
||||||
type Item = (Style, usize);
|
type Item = (Style, usize);
|
||||||
fn next(&mut self) -> Option<(Style, usize)> {
|
fn next(&mut self) -> Option<(Style, usize)> {
|
||||||
while let Some(event) = self.highlight_iter.next() {
|
while let Some(event) = self.highlight_iter.next() {
|
||||||
|
|
||||||
// let style = self.active_highlights.iter().fold(self.text_style, |acc, span| {
|
// let style = self.active_highlights.iter().fold(self.text_style, |acc, span| {
|
||||||
// acc.patch(event.1)
|
// acc.patch(event.1)
|
||||||
// });
|
// });
|
||||||
|
|
||||||
return Some((self.text_style.patch(event.1), event.0.head))
|
return Some((self.text_style.patch(event.1), event.0.head));
|
||||||
|
|
||||||
// match event {
|
// match event {
|
||||||
// HighlightEvent::HighlightStart(highlights) => {
|
// HighlightEvent::HighlightStart(highlights) => {
|
||||||
|
@ -520,7 +518,6 @@ pub fn render_text<'t>(
|
||||||
// line_decoration.render_foreground(renderer, last_line_pos, char_pos);
|
// line_decoration.render_foreground(renderer, last_line_pos, char_pos);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
Loading…
Reference in New Issue