'last_command' re-runs the last command invoked on SE commandline.
This is a slightly modified version.
/**
* derived from gemacs.e<p>
* last_command executes the last valid command that was run from the command line.<br>
* This version CAN be run even from the command line, although it doesn't make much sense ...
*/
_command void hs2_execute_last_command () name_info(','VSARG2_READ_ONLY|VSARG2_TEXT_BOX|VSARG2_EDITORCTL)
{
index := prev_index('','C');
last_index(index,'C');
// go back in retrieve buffer until a (valid) entry is found
_str line="";
do
{
_cmdline.retrieve_skip();
_cmdline.get_command(line);
} while ( pos ( 'last_command', stranslate(line,'_','-') ) );
clear_message();
command_put(line);
command_execute();
_str cmsg = get_message();
message(cmsg " - '" line "' re-done." );
// message(line " re-done" ((cmsg :== '') ? "." : " -> '" get_message() "'"));
return;
}
Have fun, HS2