mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 09:56:31 +00:00
vim-patch:8.0.1538: popupmenu is too far left when completion is long
Problem: Popupmenu is too far left when completion is long. (Linwei)
Solution: Adjust column computations. (Hirohito Higashi, closes vim/vim#2661)
bb008dd323
This commit is contained in:
@@ -306,13 +306,13 @@ void pum_display(pumitem_T *array, int size, int selected, bool array_changed,
|
||||
|| col < Columns - max_width))) {
|
||||
// align right pum edge with "col"
|
||||
if (curwin->w_p_rl
|
||||
&& col < max_width + pum_scrollbar + 1) {
|
||||
&& W_ENDCOL(curwin) < max_width + pum_scrollbar + 1) {
|
||||
pum_col = col + max_width + pum_scrollbar + 1;
|
||||
if (pum_col >= Columns) {
|
||||
pum_col = Columns - 1;
|
||||
}
|
||||
} else if (!curwin->w_p_rl) {
|
||||
if (col > Columns - max_width - pum_scrollbar) {
|
||||
if (curwin->w_wincol > Columns - max_width - pum_scrollbar) {
|
||||
pum_col = col - max_width - pum_scrollbar;
|
||||
if (pum_col < 0) {
|
||||
pum_col = 0;
|
||||
|
Reference in New Issue
Block a user