on master help sign in
Fix code indentation (#671)
03ad9e0Omnikar
helix-term/src/ui/editor.rs+15−15
@@ -148,21 +148,21 @@ impl EditorView {
148 syntax
148 syntax
149 .highlight_iter(text.slice(..), Some(range), None, |language| {
149 .highlight_iter(text.slice(..), Some(range), None, |language| {
150 loader
150 loader
151− .language_config_for_scope(&format!("source.{}", language))
151+ .language_config_for_scope(&format!("source.{}", language))
152− .and_then(|language_config| {
152+ .and_then(|language_config| {
153− let config = language_config.highlight_config(scopes)?;
153+ let config = language_config.highlight_config(scopes)?;
154− let config_ref = config.as_ref();
154+ let config_ref = config.as_ref();
155− // SAFETY: the referenced `HighlightConfiguration` behind
155+ // SAFETY: the referenced `HighlightConfiguration` behind
156− // the `Arc` is guaranteed to remain valid throughout the
156+ // the `Arc` is guaranteed to remain valid throughout the
157− // duration of the highlight.
157+ // duration of the highlight.
158− let config_ref = unsafe {
158+ let config_ref = unsafe {
159− std::mem::transmute::<
159+ std::mem::transmute::<
160− _,
160+ _,
161− &'static syntax::HighlightConfiguration,
161+ &'static syntax::HighlightConfiguration,
162− >(config_ref)
162+ >(config_ref)
163− };
163+ };
164− Some(config_ref)
164+ Some(config_ref)
165− })
165+ })
166 })
166 })
167 .map(|event| event.unwrap())
167 .map(|event| event.unwrap())
168 .collect() // TODO: we collect here to avoid holding the lock, fix later
168 .collect() // TODO: we collect here to avoid holding the lock, fix later