Better handling of automatic block closing

This commit is contained in:
Joshua Barretto 2025-10-29 10:27:47 +00:00
parent 71a0a89f5f
commit 78e2dbfaff

View file

@ -698,7 +698,7 @@ impl Buffer {
.next()
&& let next_char = self.text.chars().get(next_pos)
{
let close_block = (next_tok != Some(r)
let close_block = (next_tok.map_or(true, |c| *c == '\n') // TODO: More robust is_line_end check
&& next_indent
.strip_prefix(&*prev_indent)
.map_or(false, |i| i.is_empty()))