[formatting demo] Extend selection when commenting a region

Closes #1176