Hi all,
When I add the following code to the declaration of my command, I get a different
outcome on the text that is being obtained from a selection:
name_info(','VSARG2_REQUIRES_EDITORCTL|VSARG2_REQUIRES_PRO_EDITION)
When the macro is declared as follows, it only selects the first word in the selection. ( _str text = hs2_cur_word_sel(); )
_command void PrintMacro2() name_info(','VSARG2_REQUIRES_EDITORCTL|VSARG2_REQUIRES_PRO_EDITION)
{
_str text = hs2_cur_word_sel();
_begin_select();
// Find end of statement. This handles multiple-line statements.
search(";","@hXcs");
insert_blankline_below();
_insert_text('printf("' :+ text :+ '\n");');
}
But if it is declared this way (omitting the VSARGS stuff), it will use the entire selection in the text variable:
_command void PrintMacro2()
Why is that?