Mercurial > vim
diff src/ui.c @ 26466:d413104a94c8 v8.2.3763
patch 8.2.3763: when editing the cmdline a callback may cause a scroll up
Commit: https://github.com/vim/vim/commit/e50507126f532a0b0ae65e201a6372b7ea5b0ccd
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Dec 9 10:51:05 2021 +0000
patch 8.2.3763: when editing the cmdline a callback may cause a scroll up
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 09 Dec 2021 12:00:05 +0100 |
parents | 3af56224dca6 |
children | fac6673086df |
line wrap: on
line diff
--- a/src/ui.c +++ b/src/ui.c @@ -1156,29 +1156,7 @@ ui_focus_change( : EVENT_FOCUSLOST, NULL, NULL, FALSE, curbuf); if (need_redraw) - { - // Something was executed, make sure the cursor is put back where it - // belongs. - need_wait_return = FALSE; - - if (State & CMDLINE) - redrawcmdline(); - else if (State == HITRETURN || State == SETWSIZE || State == ASKMORE - || State == EXTERNCMD || State == CONFIRM || exmode_active) - repeat_message(); - else if ((State & NORMAL) || (State & INSERT)) - { - if (must_redraw != 0) - update_screen(0); - setcursor(); - } - cursor_on(); // redrawing may have switched it off - out_flush_cursor(FALSE, TRUE); -# ifdef FEAT_GUI - if (gui.in_use) - gui_update_scrollbars(FALSE); -# endif - } + redraw_after_callback(TRUE, TRUE); // File may have been changed from 'readonly' to 'noreadonly' if (need_maketitle)