diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-09-01 16:00:53 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-01 16:00:53 +0100 |
commit | 7d7ad7b2e8c6403033fbdb083f092321c0ccbfaf (patch) | |
tree | 4dc8f66a97862870b7d09ac390e75f0912b046e1 /src/ex_docmd.c | |
parent | be807d582499acbe314ead3891481cba6ca136df (diff) |
patch 9.0.0350: :echowindow does not work in a compiled functionv9.0.0350
Problem: :echowindow does not work in a compiled function.
Solution: Handle the expression at compile time.
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 9f7875f5eb..ae1f1959b7 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -8349,11 +8349,20 @@ ex_redir(exarg_T *eap) } /* - * ":redraw": force redraw + * ":redraw": force redraw, with clear for ":redraw!". */ void ex_redraw(exarg_T *eap) { + redraw_cmd(eap->forceit); +} + +/* + * ":redraw": force redraw, with clear if "clear" is TRUE. + */ + void +redraw_cmd(int clear) +{ int r = RedrawingDisabled; int p = p_lz; @@ -8361,7 +8370,7 @@ ex_redraw(exarg_T *eap) p_lz = FALSE; validate_cursor(); update_topline(); - update_screen(eap->forceit ? UPD_CLEAR : VIsual_active ? UPD_INVERTED : 0); + update_screen(clear ? UPD_CLEAR : VIsual_active ? UPD_INVERTED : 0); if (need_maketitle) maketitle(); #if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL)) |