When I place the cursor at the start of a line in Evil's normal state and then switch to visual state, the function bolp (which checks if the cursor is at the beginning of a line) returns nil. When checking for point, it has increased by one after entering visual state. Visually the cursor doesn't move.
If I start in visual state when I am not at the beginning of the line and then move to the beginning of the line with 0, bolp correctly returns t. So, this is only a problem when the cursor is at the beginning of the line when entering visual state.
- How can I reliably check if I'm at the beginning of a line?
- Am I doing something wrong?
- Is there maybe variable I can configure to change this behaviour?
Update: I understand the problem now. Without evil-mode setting the mark doesn't mark the first character, one has to move forward one char to do so. Evil automatically marks the first character to copy the behaviour of vim. So it moves forward by one character when switching to visual state.