bugfix in output editor wrapping
scenario: - run a script that renders text in different font sizes - hide the code, then run the script in a way that prints logs or causes an error - show the code - the output buffer shows logs in the right font size, but wrapped with a font size used in the script
This commit is contained in:
parent
aa590becd1
commit
61bd89a3fe
|
@ -2,5 +2,6 @@ print_to_output = function(...)
|
|||
local line = table.concat(map({...}, tostring), ' ')
|
||||
table.insert(Current_pane.output_editor_state.lines,
|
||||
{data=line})
|
||||
love.graphics.setFont(Font)
|
||||
Text.redraw_all(Current_pane.output_editor_state)
|
||||
end
|
|
@ -3,6 +3,7 @@ send_errors_to_output = function(err)
|
|||
local error_with_callstack = cleaned_up_frame(tostring(err))..'\n'..cleaned_up_callstack(callstack)
|
||||
table.insert(Current_pane.output_editor_state.lines, {data=''})
|
||||
Current_pane.output_editor_state.cursor1 = {line=#Current_pane.output_editor_state.lines, pos=1}
|
||||
love.graphics.setFont(Font)
|
||||
Text.redraw_all(Current_pane.output_editor_state)
|
||||
Text.insert_text(Current_pane.output_editor_state, error_with_callstack)
|
||||
clear_handlers()
|
||||
|
|
Loading…
Reference in New Issue