helix-mods/helix-view
Michael Davis a1e20a3426
Reorganize Document::apply_impl (#11304)
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>
2024-07-26 09:32:02 +02:00
..
src Reorganize Document::apply_impl (#11304) 2024-07-26 09:32:02 +02:00
tests/encoding Move helix-view/tests/*txt files to txts subdirectory (#372) 2021-06-25 15:59:06 +09:00
Cargo.toml build(deps): bump the rust-dependencies group with 5 updates (#11113) 2024-07-09 19:40:22 +09:00