Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
14628:e5ecb4e6ae55 | 14629:100a44722322 |
---|---|
445 redraw_after_callback(int call_update_screen) | 445 redraw_after_callback(int call_update_screen) |
446 { | 446 { |
447 ++redrawing_for_callback; | 447 ++redrawing_for_callback; |
448 | 448 |
449 if (State == HITRETURN || State == ASKMORE) | 449 if (State == HITRETURN || State == ASKMORE) |
450 ; /* do nothing */ | 450 ; // do nothing |
451 else if (State & CMDLINE) | 451 else if (State & CMDLINE) |
452 { | 452 { |
453 /* Redrawing only works when the screen didn't scroll. Don't clear | 453 // Don't redraw when in prompt_for_number(). |
454 * wildmenu entries. */ | 454 if (cmdline_row > 0) |
455 if (msg_scrolled == 0 | 455 { |
456 // Redrawing only works when the screen didn't scroll. Don't clear | |
457 // wildmenu entries. | |
458 if (msg_scrolled == 0 | |
456 #ifdef FEAT_WILDMENU | 459 #ifdef FEAT_WILDMENU |
457 && wild_menu_showing == 0 | 460 && wild_menu_showing == 0 |
458 #endif | 461 #endif |
459 && call_update_screen) | 462 && call_update_screen) |
460 update_screen(0); | 463 update_screen(0); |
461 /* Redraw in the same position, so that the user can continue | 464 |
462 * editing the command. */ | 465 // Redraw in the same position, so that the user can continue |
463 redrawcmdline_ex(FALSE); | 466 // editing the command. |
467 redrawcmdline_ex(FALSE); | |
468 } | |
464 } | 469 } |
465 else if (State & (NORMAL | INSERT | TERMINAL)) | 470 else if (State & (NORMAL | INSERT | TERMINAL)) |
466 { | 471 { |
467 /* keep the command line if possible */ | 472 // keep the command line if possible |
468 update_screen(VALID_NO_UPDATE); | 473 update_screen(VALID_NO_UPDATE); |
469 setcursor(); | 474 setcursor(); |
470 } | 475 } |
471 cursor_on(); | 476 cursor_on(); |
472 #ifdef FEAT_GUI | 477 #ifdef FEAT_GUI |
473 if (gui.in_use && !gui_mch_is_blink_off()) | 478 if (gui.in_use && !gui_mch_is_blink_off()) |
474 /* Don't update the cursor when it is blinking and off to avoid | 479 // Don't update the cursor when it is blinking and off to avoid |
475 * flicker. */ | 480 // flicker. |
476 out_flush_cursor(FALSE, FALSE); | 481 out_flush_cursor(FALSE, FALSE); |
477 else | 482 else |
478 #endif | 483 #endif |
479 out_flush(); | 484 out_flush(); |
480 | 485 |