Merge luaML.love
This commit is contained in:
commit
2a59e38c54
|
@ -10,9 +10,6 @@ update_editor_box = function(node, preserve_screen_top_of_cursor_node)
|
|||
else
|
||||
node.editor.screen_top1, node.editor.top = schema1_of_y(node.editor, -vy(node.y))
|
||||
end
|
||||
if node.editor.font_height ~= scale(20) then
|
||||
edit.update_font_settings(node.editor, scale(20))
|
||||
end
|
||||
node.editor.left = math.floor(vx(node.x)) + Line_number_width*App.width('m')
|
||||
node.editor.right = math.ceil(vx(node.x+node.w))
|
||||
node.editor.width = node.editor.right - node.editor.left
|
||||
|
|
10
live.lua
10
live.lua
|
@ -60,9 +60,9 @@ function live.load_files_so_far()
|
|||
end
|
||||
-- load files from save dir
|
||||
for _,filename in ipairs(love.filesystem.getDirectoryItems('')) do
|
||||
local numeric_prefix, root = filename:match('^(%d+)-(.+)')
|
||||
if numeric_prefix then
|
||||
if tonumber(numeric_prefix) > 0 then -- skip 0000
|
||||
if io.open(love.filesystem.getSaveDirectory()..'/'..filename) then
|
||||
local numeric_prefix, root = filename:match('^(%d+)-(.+)')
|
||||
if numeric_prefix and tonumber(numeric_prefix) > 0 then -- skip 0000
|
||||
Live.filename[root] = filename
|
||||
table.insert(Live.filenames_to_load, filename)
|
||||
Live.final_prefix = math.max(Live.final_prefix, tonumber(numeric_prefix))
|
||||
|
@ -165,6 +165,10 @@ function live.run(buf)
|
|||
live.send_to_driver(json.encode(Live.filename))
|
||||
elseif cmd == 'DELETE' then
|
||||
local definition_name = buf:match('^%s*%S+%s+(%S+)')
|
||||
if Live.frozen_definitions[definition_name] then
|
||||
live.send_to_driver('ERROR definition '..definition_name..' is part of Freewheeling infrastructure and cannot be deleted.')
|
||||
return
|
||||
end
|
||||
if Live.filename[definition_name] then
|
||||
local index = table.find(Live.filenames_to_load, Live.filename[definition_name])
|
||||
table.remove(Live.filenames_to_load, index)
|
||||
|
|
Loading…
Reference in New Issue