matchbrackets: Needs to render with the viewport offset

pull/110/head
Blaž Hrastnik 2021-06-04 15:07:43 +09:00
parent bd4552cd2b
commit f2e554d761
1 changed files with 4 additions and 1 deletions

View File

@ -320,7 +320,10 @@ impl EditorView {
if (pos.col as u16) < viewport.width { if (pos.col as u16) < viewport.width {
let style = Style::default().add_modifier(Modifier::REVERSED); let style = Style::default().add_modifier(Modifier::REVERSED);
surface surface
.get_mut(pos.col as u16 + OFFSET, pos.row as u16) .get_mut(
viewport.x + pos.col as u16,
viewport.y + pos.row as u16,
)
.set_style(style); .set_style(style);
} }
} }