fix still more issues with the previous scenario
- source editor always expects relative paths - refresh mocked data There's still one issue after this: the font size saved in the config file is the one we use in tests. More broadly, Editor_state is completely wrong. Ideally I'd just not save any settings for the source editor if the tests fail.
This commit is contained in:
parent
57fb2d4b57
commit
5d4fd4aa93
|
@ -271,6 +271,7 @@ function source.settings()
|
||||||
if Settings == nil then Settings = {} end
|
if Settings == nil then Settings = {} end
|
||||||
if Settings.source == nil then Settings.source = {} end
|
if Settings.source == nil then Settings.source = {} end
|
||||||
Settings.source.x, Settings.source.y, Settings.source.displayindex = App.screen.position()
|
Settings.source.x, Settings.source.y, Settings.source.displayindex = App.screen.position()
|
||||||
|
App.screen.width, App.screen.height = App.screen.size()
|
||||||
File_navigation.cursors[Editor_state.filename] = {cursor1=Editor_state.cursor1, screen_top1=Editor_state.screen_top1}
|
File_navigation.cursors[Editor_state.filename] = {cursor1=Editor_state.cursor1, screen_top1=Editor_state.screen_top1}
|
||||||
return {
|
return {
|
||||||
x=Settings.source.x, y=Settings.source.y, displayindex=Settings.source.displayindex,
|
x=Settings.source.x, y=Settings.source.y, displayindex=Settings.source.displayindex,
|
||||||
|
|
|
@ -94,7 +94,7 @@ function edit.initialize_state(top, left, right, font, font_height, line_height)
|
||||||
right = math.floor(right),
|
right = math.floor(right),
|
||||||
width = right-left,
|
width = right-left,
|
||||||
|
|
||||||
filename = love.filesystem.getSourceBaseDirectory()..'/lines.txt', -- '/' should work even on Windows
|
filename = 'run.lua',
|
||||||
next_save = nil,
|
next_save = nil,
|
||||||
|
|
||||||
-- undo
|
-- undo
|
||||||
|
|
Loading…
Reference in New Issue
Block a user