From 703ed11c97256997aa0ce8aa5fe04b6e89e8e829 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 10 Sep 2019 00:42:59 -0400 Subject: vim-patch:8.0.1491: the minimum width of the popup menu is hard coded Problem: The minimum width of the popup menu is hard coded. Solution: Add the 'pumwidth' option. (Christian Brabandt, James McCoy, closes vim/vim#2314) https://github.com/vim/vim/commit/a8f04aa275984183bab5bb583b128f38c64abb69 --- test/functional/ui/popupmenu_spec.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'test/functional/ui/popupmenu_spec.lua') diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua index fabcc05ce6..ae84145934 100644 --- a/test/functional/ui/popupmenu_spec.lua +++ b/test/functional/ui/popupmenu_spec.lua @@ -1156,10 +1156,10 @@ describe('builtin popupmenu', function() funcs.complete(29, {'word', 'choice', 'text', 'thing'}) screen:expect([[ some long prefix before the ^ | - {1:~ }{n: word }| - {1:~ }{n: choice}| - {1:~ }{n: text }| - {1:~ }{n: thing }| + {1:~ }{n: word }| + {1:~ }{n: choice }| + {1:~ }{n: text }| + {1:~ }{n: thing }| {1:~ }| {1:~ }| {1:~ }| @@ -1204,10 +1204,10 @@ describe('builtin popupmenu', function() feed('') screen:expect([[ some long prefix before the text| - {1:^~ }{n: word }| - {1:~ }{n: choice}| - {1:~ }{s: text }| - {1:~ }{n: thing }| + {1:^~ }{n: word }| + {1:~ }{n: choice }| + {1:~ }{s: text }| + {1:~ }{n: thing }| {1:~ }| {1:~ }| {1:~ }| @@ -1301,10 +1301,10 @@ describe('builtin popupmenu', function() funcs.complete(29, {'word', 'choice', 'text', 'thing'}) screen:expect([[ some long prefix before the ^ | - {1:~ }{n: word }| - {1:~ }{n: choice}| - {1:~ }{n: text }| - {1:~ }{n: thing }| + {1:~ }{n: word }| + {1:~ }{n: choice }| + {1:~ }{n: text }| + {1:~ }{n: thing }| {1:~ }| {1:~ }| {1:~ }| -- cgit From 51c9e3c4d19f26af11a86a8f736a74a5cb6f2fa2 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 10 Sep 2019 20:53:13 -0400 Subject: 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) https://github.com/vim/vim/commit/bb008dd3239c5fe3ac04501e38e4c950fa9426c8 --- test/functional/ui/popupmenu_spec.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'test/functional/ui/popupmenu_spec.lua') diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua index ae84145934..13affac571 100644 --- a/test/functional/ui/popupmenu_spec.lua +++ b/test/functional/ui/popupmenu_spec.lua @@ -1156,10 +1156,10 @@ describe('builtin popupmenu', function() funcs.complete(29, {'word', 'choice', 'text', 'thing'}) screen:expect([[ some long prefix before the ^ | - {1:~ }{n: word }| - {1:~ }{n: choice }| - {1:~ }{n: text }| - {1:~ }{n: thing }| + {n:word }{1: }| + {n:choice }{1: }| + {n:text }{1: }| + {n:thing }{1: }| {1:~ }| {1:~ }| {1:~ }| @@ -1204,10 +1204,10 @@ describe('builtin popupmenu', function() feed('') screen:expect([[ some long prefix before the text| - {1:^~ }{n: word }| - {1:~ }{n: choice }| - {1:~ }{s: text }| - {1:~ }{n: thing }| + {n:^word }{1: }| + {n:choice }{1: }| + {s:text }{1: }| + {n:thing }{1: }| {1:~ }| {1:~ }| {1:~ }| @@ -1301,10 +1301,10 @@ describe('builtin popupmenu', function() funcs.complete(29, {'word', 'choice', 'text', 'thing'}) screen:expect([[ some long prefix before the ^ | - {1:~ }{n: word }| - {1:~ }{n: choice }| - {1:~ }{n: text }| - {1:~ }{n: thing }| + {n:word }{1: }| + {n:choice }{1: }| + {n:text }{1: }| + {n:thing }{1: }| {1:~ }| {1:~ }| {1:~ }| -- cgit From 1d3d84fe818efaf47d8f818fcc44368d144443a1 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 26 Dec 2019 13:21:35 -0500 Subject: vim-patch:8.1.0554: popup menu overlaps with preview window Problem: Popup menu overlaps with preview window. Solution: Adjust the height computation. (Hirohito Higashi, closes vim/vim#3414) https://github.com/vim/vim/commit/614ab8aa00346724bfc27980d25985d482269b75 Cherry-picked "row -> pum_win_row" rename changes from patch 8.1.0062. --- test/functional/ui/popupmenu_spec.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'test/functional/ui/popupmenu_spec.lua') diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua index 13affac571..4c7f516c43 100644 --- a/test/functional/ui/popupmenu_spec.lua +++ b/test/functional/ui/popupmenu_spec.lua @@ -739,16 +739,16 @@ describe('builtin popupmenu', function() ee | ff | gg | - {s:aa } | - {n:bb }{3:iew][+] }| - {n:cc } | - {n:dd } | - {n:ee } | - {n:ff } | - {n:gg } | - {n:hh } | - {n:ii } | - {n:jj } | + hh | + {s:aa }{c: }{3:ew][+] }| + {n:bb }{c: } | + {n:cc }{c: } | + {n:dd }{c: } | + {n:ee }{c: } | + {n:ff }{c: } | + {n:gg }{c: } | + {n:hh }{c: } | + {n:ii }{s: } | aa^ | {4:[No Name] [+] }| {2:-- }{5:match 1 of 10} | -- cgit From ebd5c2cdda9a7114070021cbbc163054aa8f62da Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 29 Dec 2019 23:16:52 -0500 Subject: ui: add basic tests for pumheight,pumwidth --- test/functional/ui/popupmenu_spec.lua | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'test/functional/ui/popupmenu_spec.lua') diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua index 4c7f516c43..a0e5c3ca63 100644 --- a/test/functional/ui/popupmenu_spec.lua +++ b/test/functional/ui/popupmenu_spec.lua @@ -2019,4 +2019,42 @@ describe('builtin popupmenu', function() {9:-- Keyword Local completion (^N^P) }{10:match 1 of 3} | ]]) end) + + it("'pumheight'", function() + screen:try_resize(32,8) + feed('isome long prefix before the ') + command("set completeopt+=noinsert,noselect") + command("set linebreak") + command("set pumheight=2") + funcs.complete(29, {'word', 'choice', 'text', 'thing'}) + screen:expect([[ + some long prefix before the ^ | + {n:word }{c: }{1: }| + {n:choice }{s: }{1: }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {2:-- INSERT --} | + ]]) + end) + + it("'pumwidth'", function() + screen:try_resize(32,8) + feed('isome long prefix before the ') + command("set completeopt+=noinsert,noselect") + command("set linebreak") + command("set pumwidth=8") + funcs.complete(29, {'word', 'choice', 'text', 'thing'}) + screen:expect([[ + some long prefix before the ^ | + {n:word }{1: }| + {n:choice }{1: }| + {n:text }{1: }| + {n:thing }{1: }| + {1:~ }| + {1:~ }| + {2:-- INSERT --} | + ]]) + end) end) -- cgit