diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2026-09-18 10:51:34 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-18 10:51:34 -0400 |
| commit | cf09c38d756ad2fb2cce19431c58feea7772a52a (patch) | |
| tree | 2ef2d1694b1e50db1dc662b9741f754e47d67e98 /runtime/lua/vim/provider/python.lua | |
| parent | 97a524e8bc89cbdfad3355443774936cc73f010c (diff) | |
| download | rneovim-cf09c38d756ad2fb2cce19431c58feea7772a52a.tar.gz rneovim-cf09c38d756ad2fb2cce19431c58feea7772a52a.tar.bz2 rneovim-cf09c38d756ad2fb2cce19431c58feea7772a52a.zip | |
refactor(undo): redundant "forget" logic #41980
Problem:
`u_undo_and_forget()` and `u_forget_unchanged()` do similar undo-tree
surgery: unlink a header, promote the alt branch it displaced.
Solution:
Extract common logic to `u_forget_header()`.
Bonus:
- The `:undo!` copy now fixes `b_u_oldhead`, so after forgetting a root
header, its alt branch is still listed by `undotree()`.
- Freeing can no longer unlink the promoted branch: `uh_alt_prev` is
cleared first. The old code relied on the forgotten header being the
first sibling.
Diffstat (limited to 'runtime/lua/vim/provider/python.lua')
0 files changed, 0 insertions, 0 deletions