20 lines
417 B
Plaintext
20 lines
417 B
Plaintext
initialize_item = function(id, depth)
|
|
local path
|
|
if depth == 0 then
|
|
path = full_path(id)
|
|
else
|
|
path = comment_path(id)
|
|
end
|
|
local result = {
|
|
type='text',
|
|
id=id, filename=path,
|
|
width=Width, depth=depth,
|
|
metadata=load_metadata(id),
|
|
border=Border_color,
|
|
}
|
|
load_from_disk(result)
|
|
-- massage schema slightly; this isn't an editor state
|
|
result.data = result.lines
|
|
result.lines = nil
|
|
return result
|
|
end |