diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-08-15 15:48:44 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-08-15 15:48:44 -0700 |
commit | 333a0318d98866b6d34fc51f3eddb970457da1a5 (patch) | |
tree | b608d953cbc24ff4628b1d0ab2e169b7f3a5df46 | |
parent | 9e0cd4ad4cde0296350e5b0440ab6e6424dc1262 (diff) | |
download | view.love-333a0318d98866b6d34fc51f3eddb970457da1a5.tar.gz |
drop some unnecessary calls
-rw-r--r-- | text.lua | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/text.lua b/text.lua index bcecf7b..27849bd 100644 --- a/text.lua +++ b/text.lua @@ -18,9 +18,6 @@ function Text.draw(State, line_index, y, startpos) local x = State.left local pos = 1 local screen_line_starting_pos = startpos - if line_cache.fragments == nil then - Text.compute_fragments(State, line_index) - end Text.populate_screen_line_starting_pos(State, line_index) for _, f in ipairs(line_cache.fragments) do local frag, frag_text = f.data, f.text @@ -704,9 +701,6 @@ end function Text.to_pos_on_line(State, line_index, mx, my) local line = State.lines[line_index] local line_cache = State.line_cache[line_index] - if line_cache.fragments == nil then - Text.compute_fragments(State, line_index) - end assert(my >= line_cache.starty) -- duplicate some logic from Text.draw local y = line_cache.starty |