Auto trim trailing space upon saving