diff options
author | Pascal Kuthe | 2023-02-16 21:15:06 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2023-05-18 06:20:55 +0000 |
commit | f8225ed9219f23cf04bd378ec43e1e1a1059a0ed (patch) | |
tree | 92b9b7f4d44b2655bb8d3fc3825203655bfd465f /helix-view/src/handlers/dap.rs | |
parent | 6842fd4c36c5855023b007a36b0b5c8bd965d8de (diff) |
fix panic when deleting overlapping ranges
Some deletion operations (especially those that use indentation)
can generate overlapping deletion ranges when using multiple cursors.
To fix that problem a new `Transaction::delete` and
`Transaction:delete_by_selection` function were added. These functions
merge overlapping deletion ranges instead of generating an invalid
transaction. This merging of changes is only possible for deletions
and not for other changes and therefore require its own function.
The function has been used in all commands that currently delete
text by using `Transaction::change_by_selection`.
Diffstat (limited to 'helix-view/src/handlers/dap.rs')
0 files changed, 0 insertions, 0 deletions