Set caret after removing the placeholder text

Patch by https://github.com/AlfonsoML/confighelper/pull/5 but it had bad
indentation.