Unify inline format commands caret toggle logic