ctrl+q for debugging

This commit is contained in:
nadrad 2024-03-30 19:06:41 +01:00
parent 79f0603abd
commit 533a8b94ae

17
h-m-m
View file

@ -338,6 +338,7 @@ $keybindings[special_keys['ctrl_p']] = 'append';
$keybindings['q'] = 'quit';
$keybindings['Q'] = 'shutdown';
$keybindings[special_keys['ctrl_q']] = 'quit_with_debug';
$keybindings['r'] = 'collapse_other_branches';
$keybindings['R'] = 'collapse_inner';
@ -2558,6 +2559,22 @@ function quit()
}
function quit_with_debug()
{
global $mm;
$file = fopen('./h-m-m--debug.txt', "w");
if ($file!==false)
{
fwrite($file, serialize($mm));
fclose($file);
echo "Debug information is written to h-m-m--debug.txt file.";
}
shutdown();
}
// }}}
// {{{ move_window