Skip to content

Commit

Permalink
workaround for v -skip-unused .
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Nov 18, 2024
1 parent c017f1f commit b8683b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ved.v
Original file line number Diff line number Diff line change
Expand Up @@ -2189,7 +2189,8 @@ fn (mut ved Ved) update_cur_fn_name() {
return
}
// TODO optimize, no allocations
for i := int_min(ved.view.y - 1, ved.view.lines.len - 1); i >= 0; i-- {
start := int_min(ved.view.y - 1, ved.view.lines.len - 1)
for i := start; i >= 0; i-- {
line := ved.view.lines[i]
if line == '}' {
ved.cur_fn_name = ''
Expand Down

0 comments on commit b8683b8

Please sign in to comment.