Fix bug recently introduced when saving old buffer selection
Fix another related bug when setting selection on editor creation