From 8f88af234a5fbb35a25c5a6ae922dbd5ffeb3dd7 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 10 Jul 2024 00:25:38 -0700 Subject: patch a vector for memory leaks Multiple editors in an app shouldn't create duplicate font objects. Not strictly needed for this app, but feels hard-won enough I want to pull this in from Carousel to all forks. This still isn't ideal. Ideally we'd automatically share the font. --- edit.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edit.lua b/edit.lua index 69756b7..987fa17 100644 --- a/edit.lua +++ b/edit.lua @@ -537,9 +537,9 @@ end function edit.key_release(State, key, scancode) end -function edit.update_font_settings(State, font_height) +function edit.update_font_settings(State, font_height, font) State.font_height = font_height - State.font = love.graphics.newFont(State.font_height) + State.font = font or love.graphics.newFont(State.font_height) State.line_height = math.floor(font_height*1.3) end -- cgit 1.4.1-2-gfad0 <akspecs@tilde.institute>
summary refs log tree commit diff stats
path: root/ranger.py
blob: 7ab00a26ec6459950d45ab22b4d126595e2cbf0e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36