changed cursor behavior and added state transtion after command input in visual mode