fix stack traces

This commit is contained in:
MihailRis 2025-04-20 13:10:26 +03:00
parent 32af745eb9
commit 05ddffb5c9
4 changed files with 20 additions and 10 deletions

View File

@ -1,14 +1,14 @@
<splitbox id="editorRoot" orientation="horizontal" split-pos="0.3"> <splitbox id="editorRoot" orientation="horizontal" split-pos="0.3">
<splitbox split-pos="0.75"> <splitbox split-pos="0.75">
<panel interval="2" color="0" padding="2"> <panel interval="2" color="0" padding="2">
<textbox pos="2" sub-consumer="filter_files"></textbox> <textbox pos="2" padding="4,0,4,0" sub-consumer="filter_files" hint="@Filter"></textbox>
<panel id="filesList" color="#00000010" interval="6" padding="4" <panel id="filesList" color="#00000030" interval="6" padding="4"
size-func="-1,-45" pos="2,38"> size-func="-1,-45" pos="2,38">
<!-- content is generated in script --> <!-- content is generated in script -->
</panel> </panel>
</panel> </panel>
<panel id="problemsLog" <panel id="problemsLog"
color="#00000010" color="#00000030"
padding="5,15,5,15"> padding="5,15,5,15">
<label margin="0,0,0,5">@Problems</label> <label margin="0,0,0,5">@Problems</label>
</panel> </panel>

View File

@ -1,5 +1,5 @@
local writeables = {} local writeables = {}
local registry = require "core:internal/scripts_registry" local registry
local filenames local filenames
local current_file = { local current_file = {
@ -163,7 +163,6 @@ end
events.on("core:open_traceback", function(traceback_b64) events.on("core:open_traceback", function(traceback_b64)
local traceback = bjson.frombytes(base64.decode(traceback_b64)) local traceback = bjson.frombytes(base64.decode(traceback_b64))
modes:set('debug')
clear_traceback() clear_traceback()
@ -257,14 +256,16 @@ function build_files_list(filenames, selected)
end end
function on_open(mode) function on_open(mode)
registry = require "core:internal/scripts_registry"
local files_list = document.filesList local files_list = document.filesList
filenames = registry.filenames
table.sort(filenames)
build_files_list(filenames)
document.editorContainer:setInterval(200, refresh_file_title) document.editorContainer:setInterval(200, refresh_file_title)
clear_traceback() clear_traceback()
clear_output() clear_output()
filenames = registry.filenames
table.sort(filenames)
build_files_list(filenames)
end end

View File

@ -3,6 +3,12 @@ console_mode = "console"
history = session.get_entry("commands_history") history = session.get_entry("commands_history")
history_pointer = #history history_pointer = #history
events.on("core:open_traceback", function()
if modes then
modes:set('debug')
end
end)
function setup_variables() function setup_variables()
local pid = hud.get_player() local pid = hud.get_player()
local x,y,z = player.get_pos(pid) local x,y,z = player.get_pos(pid)

View File

@ -1,4 +1,7 @@
local export = {} local export = {
filenames = {},
classification = {}
}
local function collect_components(dirname, dest) local function collect_components(dirname, dest)
if file.isdir(dirname) then if file.isdir(dirname) then