new command: copy pane to new column

Handy before closing current column.
This commit is contained in:
Kartik K. Agaram 2022-08-02 21:10:48 -07:00
parent 14948d76a5
commit 745098ff90

View File

@ -21,6 +21,7 @@ Commands = {
'close column surrounding cursor',
'add (___) (create immediately link)',
'step (___) (open link in new column)',
'extract (open note in new column)',
'unroll (___) (repeatedly step from cursor)',
'append (___) (add link after repeatedly stepping from cursor)',
'down one pane (ctrl+down)',
@ -249,6 +250,8 @@ function run_command(cmd, args)
command.add_note(args)
elseif cmd == 'step' then
command.step(args)
elseif cmd == 'extract' then
command.extract()
elseif cmd == 'unroll' then
command.unroll(args)
elseif cmd == 'append' then
@ -466,6 +469,11 @@ function command.step(rel)
command.open_file(Cache[pane.id].links[rel])
end
function command.extract(rel)
local pane = Surface[Cursor_pane.col][Cursor_pane.row]
command.open_file(pane.id)
end
function command.unroll(rel)
if rel == nil then
rel = 'next'