diff -Naur Vim_orig/vim/src/popupmnu.c Vim_2lines/vim/src/popupmnu.c --- Vim_orig/vim/src/popupmnu.c 2008-03-29 14:30:59.000000000 +0100 +++ Vim_2lines/vim/src/popupmnu.c 2008-03-29 14:47:27.000000000 +0100 @@ -73,8 +73,13 @@ validate_cursor_col(); pum_array = NULL; - row = curwin->w_cline_row + W_WINROW(curwin); - height = curwin->w_cline_height; + row = curwin->w_wrow + W_WINROW(curwin); + + /* Leave two lines of context if possible */ + if (curwin->w_cline_height - curwin->w_wrow >= 3) + height = 3; + else + height = curwin->w_cline_height - curwin->w_wrow; if (firstwin->w_p_pvw) top_clear = firstwin->w_height;