vim-patch:8.0.1574: show cursor in wrong place when using popup menu

Problem:    Show cursor in wrong place when using popup menu. (Wei Zhang)
Solution:   Force updating the cursor position.  Fix skipping over unused
            entries.
987723e084
This commit is contained in:
zeertzjq
2022-06-30 15:55:38 +08:00
parent 610cf9f950
commit e4c2ff2da4
2 changed files with 14 additions and 9 deletions

View File

@@ -5757,12 +5757,17 @@ static void linecopy(ScreenGrid *grid, int to, int from, int col, int width)
width * sizeof(sattr_T));
}
/*
* Set cursor to its position in the current window.
*/
/// Set cursor to its position in the current window.
void setcursor(void)
{
if (redrawing()) {
setcursor_mayforce(false);
}
/// Set cursor to its position in the current window.
/// @param force when true, also when not redrawing.
void setcursor_mayforce(bool force)
{
if (force || redrawing()) {
validate_cursor();
ScreenGrid *grid = &curwin->w_grid;