Fix bug which happens when cursor is on just above a fold.