Properly point at the last opening brace

This commit is contained in:
Mark Rousskov 2019-06-06 19:31:24 -06:00
parent 6b9740bf02
commit 45df52f2cc

View File

@ -183,7 +183,7 @@ fn next(&mut self) -> Option<Piece<'a>> {
'{' => {
let curr_last_brace = self.last_opening_brace;
let byte_pos = self.to_span_index(pos);
self.last_opening_brace = Some(byte_pos.to(byte_pos));
self.last_opening_brace = Some(byte_pos.to(InnerOffset(byte_pos.0 + 1)));
self.cur.next();
if self.consume('{') {
self.last_opening_brace = curr_last_brace;