mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
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)
This commit is contained in:
@@ -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().
|
||||
|
Reference in New Issue
Block a user