diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-09-17 20:37:40 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-09-17 20:37:40 -0700 |
commit | 72791d9c35be82043a2f272a8cdeb11bd676a313 (patch) | |
tree | a030774c669ac3b88055b9dfe073f023d78b83d1 /commands.lua | |
parent | 0cc8c706ffc4da107df402e3eac977aefb75f6dc (diff) | |
download | text.love-72791d9c35be82043a2f272a8cdeb11bd676a313.tar.gz |
some debug prints
I'm starting to edit the sources from within the app in ernest. First question: why does the file navigation menu skip some files? These prints answer the question.
Diffstat (limited to 'commands.lua')
-rw-r--r-- | commands.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/commands.lua b/commands.lua index be9c9bf..29e4a3e 100644 --- a/commands.lua +++ b/commands.lua @@ -55,13 +55,16 @@ function add_hotkey_to_menu(s) end function source.draw_file_navigator() + log_start('render file navigator') for i,file in ipairs(File_navigation.candidates) do if file == 'source' then App.color(Menu_border_color) love.graphics.line(Menu_cursor-10,2, Menu_cursor-10,Menu_status_bar_height-2) end + log(2, file) add_file_to_menu(file, i == File_navigation.index) end + log_end('render file navigator') end function add_file_to_menu(s, cursor_highlight) @@ -70,6 +73,7 @@ function add_file_to_menu(s, cursor_highlight) end local width = App.width(Text_cache[s]) if Menu_cursor + width > App.screen.width - 5 then + log(2, 'skipped') return end if cursor_highlight then |