Added style recognition by caret position changed