Skip to content

Commit

Permalink
eliminate import math, work towards enabling v -skip-unused .
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Nov 18, 2024
1 parent 833dcea commit c017f1f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ved.v
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import os
import time
import uiold
import clipboard
import math

const exe_dir = os.dir(os.executable())
const home_dir = os.home_dir()
Expand Down Expand Up @@ -2190,7 +2189,7 @@ fn (mut ved Ved) update_cur_fn_name() {
return
}
// TODO optimize, no allocations
for i := math.min(ved.view.y - 1, ved.view.lines.len - 1); i >= 0; i-- {
for i := int_min(ved.view.y - 1, ved.view.lines.len - 1); i >= 0; i-- {
line := ved.view.lines[i]
if line == '}' {
ved.cur_fn_name = ''
Expand Down

0 comments on commit c017f1f

Please sign in to comment.