Fix handling of templates without tokens

This directly selects the cursor after inserting the template, if there are no variable tokens. Previously pressing Enter or Tab would have no effect after completing the template, until typing other text.