mirror of
https://github.com/nadrad/h-m-m.git
synced 2024-05-17 22:46:32 +02:00
ctrl+p function added
This commit is contained in:
parent
5a2c79bf03
commit
36da570c07
23
h-m-m
23
h-m-m
|
@ -1643,6 +1643,22 @@ function encode_tree(&$mm, $id, $exclude_parent = false, $base = 0){
|
|||
}
|
||||
|
||||
|
||||
// }}}
|
||||
// {{{ append
|
||||
|
||||
function append(&$mm){
|
||||
|
||||
$mm['nodes'][ $mm['active_node'] ]['title'] .=
|
||||
' '.
|
||||
trim(get_from_clipboard());
|
||||
|
||||
build_map($mm);
|
||||
display($mm);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// }}}
|
||||
// {{{ paste sub-tree
|
||||
|
||||
|
@ -2200,8 +2216,9 @@ function monitor_key_presses(&$mm){
|
|||
if ($in=='d') delete_node($mm);
|
||||
if ($in=='D') delete_node($mm, true);
|
||||
|
||||
if ($in=='p') paste_sub_tree($mm, false);
|
||||
if ($in=='P') paste_sub_tree($mm, true);
|
||||
if ($in=='p') paste_sub_tree($mm, false);
|
||||
if ($in=='P') paste_sub_tree($mm, true);
|
||||
if ($in=="\020") append($mm); // ^p
|
||||
|
||||
if ($in=='J') move_active_node_down($mm);
|
||||
if ($in=='K') move_active_node_up($mm);
|
||||
|
@ -2216,7 +2233,7 @@ function monitor_key_presses(&$mm){
|
|||
|
||||
// move(1,1);
|
||||
// for ($i=0; $i<strlen($in); $i++)
|
||||
// echo ord($in[$i]).' ';
|
||||
// echo base_convert(ord($in[$i]),10,8).' ';
|
||||
// echo ' ';
|
||||
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ Adding, removing, and editing nodes:
|
|||
* `D` - deletes (cuts) the descendants of the active node
|
||||
* `p` - pastes as descendants of the active node
|
||||
* `P` - pastes as siblings of the active node
|
||||
* `ctrl+p` - appends the clipboard text at the end of the active node's title
|
||||
* `e` - edits the active node
|
||||
* `E` - edits the active node, ignoring the existing text
|
||||
|
||||
|
|
Loading…
Reference in a new issue