Final commit: format selection change doesn't cause location to be lost