mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
fix(api): update topline when flushing with nvim__redraw() (#34346)
Problem: nvim__redraw may update the screen with an invalid topline. Solution: Update the topline before calling `update_screen()` (as :redraw does).
This commit is contained in:
@ -2376,6 +2376,8 @@ void nvim__redraw(Dict(redraw) *opts, Error *err)
|
||||
// Redraw pending screen updates when explicitly requested or when determined
|
||||
// that it is necessary to properly draw other requested components.
|
||||
if (opts->flush && !cmdpreview) {
|
||||
validate_cursor(curwin);
|
||||
update_topline(curwin);
|
||||
update_screen();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user