end
function command.unroll(rel)
if rel == nil then
rel = 'next'
end
local pane = Surface[Cursor_pane.col][Cursor_pane.row]
if Cache[pane.id].links[rel] == nil then
print(('%s has no %s note'):format(pane.id, rel))
return
end
local column = {name=('%s from %s'):format(rel, pane.id)}
local curr = pane.id
while curr do
local pane = load_pane_from_file(curr)
table.insert(column, pane)
curr = Cache[curr].links[rel]
end
table.insert(Surface, Cursor_pane.col+1, column)
Cursor_pane.col = Cursor_pane.col+1
Cursor_pane.row = 1
local col_sx = left_edge_sx(Cursor_pane.col)
if col_sx > Display_settings.x + App.screen.width - Display_settings.column_width then
Display_settings.x = math.max(0, col_sx + Display_settings.column_width + Margin_right + Padding_horizontal - App.screen.width)
Display_settings.y = 0
end
update_pane_bounds()