Auto pair deletions with selections (#15010) master
* Add Transaction::change_by_and_with_selection Adds `Transaction::change_by_and_with_selection` which centralizes logic for producing change sets with a potentially new selection that is applied incrementally, rather than all at once at the end with `with_selection`. It also centralizes the offset tracking logic so that the caller can construct a new selection with ranges as if they were operating on the text as-is. * backfill auto pair delete tests * Change auto pair hook to operate on single changes Change the auto pair hook to operate on single ranges to allow transactions that mix auto pair changes with other operations, such as inserting or deleting a single char, and denendting. * add delete_by_and_with_selection * Delete pairs with multi-char-range selections This completes auto pair deletions. Currently, auto pairs only get deleted when the range is a single grapheme wide, since otherwise, the selection would get computed incorrectly through the normal change mapping process. Now auto pairs get deleted even with larger ranges, and the resulting selection is correct. * insert double whitespace inside pair * account for overlapping deletes * fix as-is tests