aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/vim.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r--src/nvim/api/vim.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index 89e974c098..0d562f2276 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -2396,13 +2396,13 @@ void nvim__redraw(Dict(redraw) *opts, Error *err)
last = rbuf->b_ml.ml_line_count;
}
redraw_buf_range_later(rbuf, first, last);
+ opts->flush = HAS_KEY(opts, redraw, flush) ? opts->flush : true;
}
- bool flush = opts->flush;
if (opts->tabline) {
// Flush later in case tabline was just hidden or shown for the first time.
if (redraw_tabline && firstwin->w_lines_valid == 0) {
- flush = true;
+ opts->flush = true;
} else {
draw_tabline();
}
@@ -2416,23 +2416,23 @@ void nvim__redraw(Dict(redraw) *opts, Error *err)
if (win == NULL) {
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
if (buf == NULL || wp->w_buffer == buf) {
- redraw_status(wp, opts, &flush);
+ redraw_status(wp, opts, &opts->flush);
}
}
} else {
- redraw_status(win, opts, &flush);
+ redraw_status(win, opts, &opts->flush);
}
}
win_T *cwin = win ? win : curwin;
// Allow moving cursor to recently opened window and make sure it is drawn #28868.
if (opts->cursor && (!cwin->w_grid.target || !cwin->w_grid.target->valid)) {
- flush = true;
+ opts->flush = true;
}
// Redraw pending screen updates when explicitly requested or when determined
// that it is necessary to properly draw other requested components.
- if (flush && !cmdpreview) {
+ if (opts->flush && !cmdpreview) {
update_screen();
}