on master help sign in
Merge pull request #80 from notoria/highlight
a05fb95Blaž Hrastnik
helix-term/src/ui/editor.rs+14
@@ -306,6 +306,20 @@ impl EditorView {
306 ),
306 ),
307 cursor_style,
307 cursor_style,
308 );
308 );
309+ if let Some(syntax) = doc.syntax() {
310+ use helix_core::match_brackets;
311+ let pos = doc.selection(view.id).cursor();
312+ let pos = match_brackets::find(syntax, doc.text(), pos);
313+ if let Some(pos) = pos {
314+ let pos = view.screen_coords_at_pos(doc, text, pos);
315+ if let Some(pos) = pos {
316+ let style = Style::default().add_modifier(Modifier::REVERSED);
317+ surface
318+ .get_mut(pos.col as u16 + OFFSET, pos.row as u16)
319+ .set_style(style);
320+ }
321+ }
322+ }
309 }
323 }
310 }
324 }
311 }
325 }