Mercurial > vim
comparison src/misc1.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 | c8f07e8b273e |
children | d2cfca5b178e |
comparison
equal
deleted
inserted
replaced
14628:e5ecb4e6ae55 | 14629:100a44722322 |
---|---|
3745 if (mouse_used != NULL) | 3745 if (mouse_used != NULL) |
3746 MSG_PUTS(_("Type number and <Enter> or click with mouse (empty cancels): ")); | 3746 MSG_PUTS(_("Type number and <Enter> or click with mouse (empty cancels): ")); |
3747 else | 3747 else |
3748 MSG_PUTS(_("Type number and <Enter> (empty cancels): ")); | 3748 MSG_PUTS(_("Type number and <Enter> (empty cancels): ")); |
3749 | 3749 |
3750 /* Set the state such that text can be selected/copied/pasted and we still | 3750 // Set the state such that text can be selected/copied/pasted and we still |
3751 * get mouse events. */ | 3751 // get mouse events. redraw_after_callback() will not redraw if cmdline_row |
3752 // is zero. | |
3752 save_cmdline_row = cmdline_row; | 3753 save_cmdline_row = cmdline_row; |
3753 cmdline_row = 0; | 3754 cmdline_row = 0; |
3754 save_State = State; | 3755 save_State = State; |
3755 State = ASKMORE; /* prevents a screen update when using a timer */ | 3756 State = CMDLINE; |
3756 #ifdef FEAT_MOUSE | 3757 #ifdef FEAT_MOUSE |
3757 /* May show different mouse shape. */ | 3758 // May show different mouse shape. |
3758 setmouse(); | 3759 setmouse(); |
3759 #endif | 3760 #endif |
3760 | |
3761 | 3761 |
3762 i = get_number(TRUE, mouse_used); | 3762 i = get_number(TRUE, mouse_used); |
3763 if (KeyTyped) | 3763 if (KeyTyped) |
3764 { | 3764 { |
3765 /* don't call wait_return() now */ | 3765 /* don't call wait_return() now */ |
3771 } | 3771 } |
3772 else | 3772 else |
3773 cmdline_row = save_cmdline_row; | 3773 cmdline_row = save_cmdline_row; |
3774 State = save_State; | 3774 State = save_State; |
3775 #ifdef FEAT_MOUSE | 3775 #ifdef FEAT_MOUSE |
3776 /* May need to restore mouse shape. */ | 3776 // May need to restore mouse shape. |
3777 setmouse(); | 3777 setmouse(); |
3778 #endif | 3778 #endif |
3779 | 3779 |
3780 return i; | 3780 return i; |
3781 } | 3781 } |