Mercurial > vim
diff src/screen.c @ 14629:100a44722322 v8.1.0328
patch 8.1.0328: inputlist() doesn't work with a timer
commit https://github.com/vim/vim/commit/4cbdf155ca7bb6fbdab2d5acafae5fc712fca8b8
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 26 21:23:07 2018 +0200
patch 8.1.0328: inputlist() doesn't work with a timer
Problem: inputlist() doesn't work with a timer. (Dominique Pelle)
Solution: Don't redraw when cmdline_row is zero. (Hirohito Higashi,
closes #3239)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 26 Aug 2018 21:30:07 +0200 |
parents | 3648e74dd523 |
children | 04c168a6d998 |
line wrap: on
line diff
--- a/src/screen.c +++ b/src/screen.c @@ -447,32 +447,37 @@ redraw_after_callback(int call_update_sc ++redrawing_for_callback; if (State == HITRETURN || State == ASKMORE) - ; /* do nothing */ + ; // do nothing else if (State & CMDLINE) { - /* Redrawing only works when the screen didn't scroll. Don't clear - * wildmenu entries. */ - if (msg_scrolled == 0 + // Don't redraw when in prompt_for_number(). + if (cmdline_row > 0) + { + // Redrawing only works when the screen didn't scroll. Don't clear + // wildmenu entries. + if (msg_scrolled == 0 #ifdef FEAT_WILDMENU - && wild_menu_showing == 0 -#endif - && call_update_screen) - update_screen(0); - /* Redraw in the same position, so that the user can continue - * editing the command. */ - redrawcmdline_ex(FALSE); + && wild_menu_showing == 0 +#endif + && call_update_screen) + update_screen(0); + + // Redraw in the same position, so that the user can continue + // editing the command. + redrawcmdline_ex(FALSE); + } } else if (State & (NORMAL | INSERT | TERMINAL)) { - /* keep the command line if possible */ + // keep the command line if possible update_screen(VALID_NO_UPDATE); setcursor(); } cursor_on(); #ifdef FEAT_GUI if (gui.in_use && !gui_mch_is_blink_off()) - /* Don't update the cursor when it is blinking and off to avoid - * flicker. */ + // Don't update the cursor when it is blinking and off to avoid + // flicker. out_flush_cursor(FALSE, FALSE); else #endif