mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-21 17:06:18 +04:00
a1e20a3426
These changes are ported from <https://redirect.github.com/helix-editor/helix/pull/9801>. It's a cleanup of `Document::apply_impl` that uses some early returns to reduce nesting and some reordering of the steps. The early returns bail out of `apply_impl` early if the transaction fails to apply or if the changes are empty (in which case we emit the SelectionDidChange event). It's a somewhat cosmetic refactor that makes the function easier to reason about but it also makes it harder to introduce bugs by mapping positions through empty changesets for example. Co-authored-by: Pascal Kuthe <pascalkuthe@pm.me> |
||
---|---|---|
.. | ||
src | ||
tests/encoding | ||
Cargo.toml |