patch 9.1.1200: cmdline pum not cleared for input() completion
Problem: Cmdline pum not cleared for input() completion.
Solution: Temporary reset RedrawingDisabled in cmdline_pum_cleanup(),
like what is done in wildmenu_cleanup() (zeertzjq).
fixes: #16874
closes: #16876
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
0adbe639a5
commit
1830e787f6
@ -419,10 +419,15 @@ cmdline_pum_active(void)
|
||||
* items and refresh the screen.
|
||||
*/
|
||||
void
|
||||
cmdline_pum_remove(void)
|
||||
cmdline_pum_remove(cmdline_info_T *cclp UNUSED)
|
||||
{
|
||||
int save_p_lz = p_lz;
|
||||
int save_KeyTyped = KeyTyped;
|
||||
#ifdef FEAT_EVAL
|
||||
int save_RedrawingDisabled = RedrawingDisabled;
|
||||
if (cclp->input_fn)
|
||||
RedrawingDisabled = 0;
|
||||
#endif
|
||||
|
||||
pum_undisplay();
|
||||
VIM_CLEAR(compl_match_array);
|
||||
@ -434,12 +439,16 @@ cmdline_pum_remove(void)
|
||||
// When a function is called (e.g. for 'foldtext') KeyTyped might be reset
|
||||
// as a side effect.
|
||||
KeyTyped = save_KeyTyped;
|
||||
#ifdef FEAT_EVAL
|
||||
if (cclp->input_fn)
|
||||
RedrawingDisabled = save_RedrawingDisabled;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
cmdline_pum_cleanup(cmdline_info_T *cclp)
|
||||
{
|
||||
cmdline_pum_remove();
|
||||
cmdline_pum_remove(cclp);
|
||||
wildmenu_cleanup(cclp);
|
||||
}
|
||||
|
||||
@ -1022,7 +1031,7 @@ ExpandOne(
|
||||
|
||||
// The entries from xp_files may be used in the PUM, remove it.
|
||||
if (compl_match_array != NULL)
|
||||
cmdline_pum_remove();
|
||||
cmdline_pum_remove(get_cmdline_info());
|
||||
}
|
||||
xp->xp_selected = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user