diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-12-05 15:37:08 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-12-05 15:37:08 -0800 |
commit | 5b72946b9a7bafc5cf648a3be56d347a9c34f6b8 (patch) | |
tree | f14dfd0857ae6bfa5f8df91c2357b872496a1756 /source.lua | |
parent | 8e3fd593559a4d27349e7aaf05649f4b9cea56fb (diff) | |
parent | ec86d7587de2bdbc9932c4c287c3997a8fa04460 (diff) | |
download | view.love-5b72946b9a7bafc5cf648a3be56d347a9c34f6b8.tar.gz |
Merge text.love
Diffstat (limited to 'source.lua')
-rw-r--r-- | source.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source.lua b/source.lua index ba6d435..242e8f5 100644 --- a/source.lua +++ b/source.lua @@ -299,12 +299,14 @@ function source.mouse_pressed(x,y, mouse_button) --? print('click on edit side') if Focus ~= 'edit' then Focus = 'edit' + return end edit.mouse_pressed(Editor_state, x,y, mouse_button) elseif Show_log_browser_side and Log_browser_state.left <= x and x < Log_browser_state.right then --? print('click on log_browser side') if Focus ~= 'log_browser' then Focus = 'log_browser' + return end log_browser.mouse_pressed(Log_browser_state, x,y, mouse_button) for _,line_cache in ipairs(Editor_state.line_cache) do line_cache.starty = nil end -- just in case we scroll @@ -361,6 +363,16 @@ function source.keychord_pressed(chord, key) end return end + if chord == 'C-k' then + -- clear logs + love.filesystem.remove('log') + -- restart to reload state of logs on screen + source.quit() + load_file_from_source_or_save_directory('main.lua') + App.undo_initialize() + App.run_tests_and_initialize() + return + end if chord == 'C-g' then Show_file_navigator = true return |