Fix bug with editing consecutive regions on the same line