The bug is easily verified by: 1. open any multi-buffer 2. place the cursor at the beginning of an excerpt 3. run the editor::ExpandExcerpts / editor: expand excerpts action 4. The excerpt is not expanded Since the `buffer_ids_for_range` function basically did the same and had even been changed the same way earlier I DRYed these functions as well. Note: I'm a rust novice, so keep an extra eye on rust technicalities when reviewing :) --- Release Notes: - Fix editor: expand excerpts failing when cursor is at excerpt start --------- Co-authored-by: Lukas Wirth <me@lukaswirth.dev>