Add "}" for switch statement.
Use current line if nothing is selected.
code format.