diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-09-17 23:05:08 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-09-17 23:05:08 -0700 |
commit | b00232e01adfbb27f8ce7642dae726e167cd90d1 (patch) | |
tree | 998535a8def9d26cbe1d9ab8375134934872b080 | |
parent | b5ff0a4764d593baf2e729f1c1cf0a3766b710c1 (diff) | |
download | view.love-b00232e01adfbb27f8ce7642dae726e167cd90d1.tar.gz |
bugfix: never skip files in file navigator
-rw-r--r-- | commands.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/commands.lua b/commands.lua index fa45b31..12189ba 100644 --- a/commands.lua +++ b/commands.lua @@ -61,6 +61,9 @@ function source.draw_file_navigator() end log(2, file) add_file_to_menu(file, i == File_navigation.index) + if Menu_cursor >= App.screen.width - 5 then + break + end end log_end('render file navigator') end @@ -68,10 +71,6 @@ end function add_file_to_menu(s, cursor_highlight) local s_text = to_text(s) local width = App.width(s_text) - if Menu_cursor + width > App.screen.width - 5 then - log(2, 'skipped') - return - end if cursor_highlight then App.color(Menu_highlight_color) love.graphics.rectangle('fill', Menu_cursor-5,5-2, width+5*2,Editor_state.line_height+2*2) |