Do not insert terminating delimiter if already exist.

If terminating delimiter already exist, move to end of line instead of insert it.

Signed-off-by: Yen-Chin Lee <coldnew.tw@gmail.com>