about summary refs log tree commit diff stats
path: root/source.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-12-05 15:26:38 -0800
committerKartik K. Agaram <vc@akkartik.com>2022-12-05 15:26:38 -0800
commitf9bea7783b4779172543901c14a02c18c50ad4f4 (patch)
tree805d33f34a0508401e036fba41ecfe785744a947 /source.lua
parent0167c57cdf3bcdb1102d4d10d02c0eb078dc8736 (diff)
downloadlines.love-f9bea7783b4779172543901c14a02c18c50ad4f4.tar.gz
source editor: clear logs
Diffstat (limited to 'source.lua')
-rw-r--r--source.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/source.lua b/source.lua
index dfffd62..096512b 100644
--- a/source.lua
+++ b/source.lua
@@ -363,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