source editor: clear logs
This commit is contained in:
parent
0167c57cdf
commit
f9bea7783b
|
@ -23,6 +23,7 @@ function source.draw_menu_bar()
|
||||||
else
|
else
|
||||||
add_hotkey_to_menu('ctrl+l: show log browser')
|
add_hotkey_to_menu('ctrl+l: show log browser')
|
||||||
end
|
end
|
||||||
|
add_hotkey_to_menu('ctrl+k: clear logs')
|
||||||
if Editor_state.expanded then
|
if Editor_state.expanded then
|
||||||
add_hotkey_to_menu('alt+b: collapse debug prints')
|
add_hotkey_to_menu('alt+b: collapse debug prints')
|
||||||
else
|
else
|
||||||
|
|
10
source.lua
10
source.lua
|
@ -363,6 +363,16 @@ function source.keychord_pressed(chord, key)
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
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
|
if chord == 'C-g' then
|
||||||
Show_file_navigator = true
|
Show_file_navigator = true
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue