mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 14:26:07 +00:00
vim-patch:9.1.1817: popup: there are some position logic bugs (#36075)
Problem: popup: there are some position logic bugs
Solution: Refactor position logic and fix a few bugs
(Girish Palya).
This change does the following:
- Simplified and rewrote horizontal positioning logic (was overly
complex).
- Split horizontal and vertical positioning into separate functions.
- Fixed missing truncation marker (e.g. `>`) when items were truncated
and `pummaxwidth` was not set.
- Fixed occasional extra space being added to menu items.
- Update tests
closes: vim/vim#18441
e3ed5584ed
Cherry-pick pum_display_{rtl,ltr}_text() changes from patch 9.1.1835.
Co-authored-by: Girish Palya <girishji@gmail.com>
This commit is contained in:
@@ -602,7 +602,7 @@ describe('cmdline', function()
|
||||
screen:expect([[
|
||||
|
|
||||
{1:~ }|*5
|
||||
{1:~ }{4: loooooooooooooooong quite loooooooooooong, real}|
|
||||
{1:~ }{4: loooooooooooooooong quite loooooooooooong, rea>}|
|
||||
:DoubleEntry ^ |
|
||||
]])
|
||||
|
||||
@@ -612,7 +612,7 @@ describe('cmdline', function()
|
||||
{1:~ }|*3
|
||||
{3: }|
|
||||
:DoubleEntry loooooooooooooooong quite loooooooooooong, real|
|
||||
ly loooooooo{12: loooooooooooooooong quite loooooooooooong, real}|
|
||||
ly loooooooo{12: loooooooooooooooong quite loooooooooooong, rea>}|
|
||||
ong entry^ |
|
||||
]])
|
||||
|
||||
@@ -620,7 +620,7 @@ describe('cmdline', function()
|
||||
screen:expect([[
|
||||
|
|
||||
{1:~ }|*3
|
||||
{3: }{4: loooooooooooooooong quite loooooooooooong, real}|
|
||||
{3: }{4: loooooooooooooooong quite loooooooooooong, rea>}|
|
||||
:DoubleEntry ^ |
|
||||
|*2
|
||||
]])
|
||||
|
Reference in New Issue
Block a user