summaryrefslogtreecommitdiffstats
path: root/src/drawscreen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-12-09 10:51:05 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-09 10:51:05 +0000
commite50507126f532a0b0ae65e201a6372b7ea5b0ccd (patch)
tree91e6c7e0409133dfd761059f03055320e3659cdc /src/drawscreen.c
parent56150da6879a96db1c84c7ec4ceedeb84969f606 (diff)
patch 8.2.3763: when editing the cmdline a callback may cause a scroll upv8.2.3763
Problem: When editing the command line a FocusLost callback may cause the screen to scroll up. Solution: Do not redraw at the last line but at the same place where the command line was before. (closes #9295)
Diffstat (limited to 'src/drawscreen.c')
-rw-r--r--src/drawscreen.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/drawscreen.c b/src/drawscreen.c
index f56ef91f29..106ae95ca5 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -3019,14 +3019,19 @@ redraw_asap(int type)
* it belongs. If highlighting was changed a redraw is needed.
* If "call_update_screen" is FALSE don't call update_screen() when at the
* command line.
+ * If "redraw_message" is TRUE.
*/
void
-redraw_after_callback(int call_update_screen)
+redraw_after_callback(int call_update_screen, int do_message)
{
++redrawing_for_callback;
- if (State == HITRETURN || State == ASKMORE)
- ; // do nothing
+ if (State == HITRETURN || State == ASKMORE || State == SETWSIZE
+ || State == EXTERNCMD || State == CONFIRM || exmode_active)
+ {
+ if (do_message)
+ repeat_message();
+ }
else if (State & CMDLINE)
{
// Don't redraw when in prompt_for_number().