refactor(ui): remove some superfluous ui_flush() calls

- <expr> mapping has no business saving and restoring the
  low-level UI cursor. The cursor will be put in a reasonable
  position after input is processed, chill out.
- TUI handles output needed for suspend
- vgetc() family of function does flushing
This commit is contained in:
bfredl
2023-02-09 20:56:30 +01:00
parent 257765d9e0
commit 30b29a36e8
8 changed files with 23 additions and 40 deletions

View File

@@ -4838,13 +4838,9 @@ static void ex_stop(exarg_T *eap)
}
apply_autocmds(EVENT_VIMSUSPEND, NULL, NULL, false, NULL);
// TODO(bfredl): the TUI should do this on suspend
ui_cursor_goto(Rows - 1, 0);
ui_call_grid_scroll(1, 0, Rows, 0, Columns, 1, 0);
ui_call_suspend();
ui_flush();
ui_call_suspend(); // call machine specific function
ui_flush();
maketitle();
resettitle(); // force updating the title
ui_refresh(); // may have resized window