mirror of
https://github.com/neovim/neovim.git
synced 2026-02-16 00:24:14 +00:00
Problem: When :edit an existing buffer, line('w$') may return a
wrong result.
Solution: Reset w_valid in curwin_init() (Jaehwang Jung)
`do_ecmd()` reinitializes the current window (`curwin_init()`) whose
`w_valid` field may have `VALID_BOTLINE` set. Resetting `w_botline`
without marking it as invalid makes subsequent `validate_botline()`
calls a no-op, thus resulting in wrong `line('w$')` value.
closes: vim/vim#14642
eb80b8304e
Co-authored-by: Jaehwang Jung <tomtomjhj@gmail.com>