diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-07-14 16:28:13 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-07-14 16:28:13 +0200 |
commit | 0346413c24b58d6d852e6767757bd76b5307afcf (patch) | |
tree | 6e40608cea2c748855fa8a1745a0394a1adb365e | |
parent | 660a10ad41c14363326f83451c3c425201923119 (diff) |
patch 8.1.1690: default padding for popup window menu is too muchv8.1.1690
Problem: Default padding for popup window menu is too much.
Solution: Only add padding left and right.
-rw-r--r-- | runtime/doc/popup.txt | 4 | ||||
-rw-r--r-- | src/popupwin.c | 2 | ||||
-rw-r--r-- | src/testdir/dumps/Test_popupwin_menu_01.dump | 8 | ||||
-rw-r--r-- | src/testdir/dumps/Test_popupwin_menu_02.dump | 8 | ||||
-rw-r--r-- | src/testdir/dumps/Test_popupwin_menu_maxwidth_1.dump | 16 | ||||
-rw-r--r-- | src/testdir/dumps/Test_popupwin_menu_scroll_1.dump | 8 | ||||
-rw-r--r-- | src/testdir/dumps/Test_popupwin_menu_scroll_2.dump | 8 | ||||
-rw-r--r-- | src/testdir/dumps/Test_popupwin_menu_scroll_3.dump | 8 | ||||
-rw-r--r-- | src/testdir/dumps/Test_popupwin_menu_scroll_4.dump | 8 | ||||
-rw-r--r-- | src/testdir/dumps/Test_popupwin_menu_scroll_5.dump | 8 | ||||
-rw-r--r-- | src/testdir/dumps/Test_popupwin_menu_scroll_6.dump | 8 | ||||
-rw-r--r-- | src/version.c | 2 |
12 files changed, 45 insertions, 43 deletions
diff --git a/runtime/doc/popup.txt b/runtime/doc/popup.txt index f74a7c228b..0fd30ebfbe 100644 --- a/runtime/doc/popup.txt +++ b/runtime/doc/popup.txt @@ -1,4 +1,4 @@ -*popup.txt* For Vim version 8.1. Last change: 2019 Jul 13 +*popup.txt* For Vim version 8.1. Last change: 2019 Jul 14 VIM REFERENCE MANUAL by Bram Moolenaar @@ -362,7 +362,7 @@ popup_menu({what}, {options}) *popup_menu()* \ drag: 1, \ wrap: 0, \ border: [], - \ padding: [], + \ padding: [0,1,0,1], \ filter: 'popup_filter_menu', \ }) < The current line is highlighted with a match using diff --git a/src/popupwin.c b/src/popupwin.c index c6c5910a30..e61b793cd4 100644 --- a/src/popupwin.c +++ b/src/popupwin.c @@ -1299,7 +1299,7 @@ popup_create(typval_T *argvars, typval_T *rettv, create_type_T type) for (i = 0; i < 4; ++i) { wp->w_popup_border[i] = 1; - wp->w_popup_padding[i] = 1; + wp->w_popup_padding[i] = (i & 1) ? 1 : 0; } } diff --git a/src/testdir/dumps/Test_popupwin_menu_01.dump b/src/testdir/dumps/Test_popupwin_menu_01.dump index 479edf6e02..bc1552018c 100644 --- a/src/testdir/dumps/Test_popupwin_menu_01.dump +++ b/src/testdir/dumps/Test_popupwin_menu_01.dump @@ -1,10 +1,10 @@ >1+0&#ffffff0| @73 -|2| @20|╔+0#0000001#ffd7ff255| |m|a|k|e| |a| |c|h|o|i|c|e| |f|r|o|m| |t|h|e| |l|i|s|t| |╗| +0#0000000#ffffff0@21 -|3| @20|║+0#0000001#ffd7ff255| @28|║| +0#0000000#ffffff0@21 +|2| @73 +|3| @20|╔+0#0000001#ffd7ff255| |m|a|k|e| |a| |c|h|o|i|c|e| |f|r|o|m| |t|h|e| |l|i|s|t| |╗| +0#0000000#ffffff0@21 |4| @20|║+0#0000001#ffd7ff255| |o+0#0000000#5fd7ff255|n|e| +0#0000001#ffd7ff255@24|║| +0#0000000#ffffff0@21 |5| @20|║+0#0000001#ffd7ff255| |t|w|o| @24|║| +0#0000000#ffffff0@21 |6| @20|║+0#0000001#ffd7ff255| |a|n|o|t|h|e|r| @20|║| +0#0000000#ffffff0@21 -|7| @20|║+0#0000001#ffd7ff255| @28|║| +0#0000000#ffffff0@21 -|8| @20|╚+0#0000001#ffd7ff255|═@28|╝| +0#0000000#ffffff0@21 +|7| @20|╚+0#0000001#ffd7ff255|═@28|╝| +0#0000000#ffffff0@21 +|8| @73 |9| @73 @57|1|,|1| @10|T|o|p| diff --git a/src/testdir/dumps/Test_popupwin_menu_02.dump b/src/testdir/dumps/Test_popupwin_menu_02.dump index 4a407d472d..594daf4c87 100644 --- a/src/testdir/dumps/Test_popupwin_menu_02.dump +++ b/src/testdir/dumps/Test_popupwin_menu_02.dump @@ -1,10 +1,10 @@ >1+0&#ffffff0| @73 -|2| @20|╔+0#0000001#ffd7ff255| |m|a|k|e| |a| |c|h|o|i|c|e| |f|r|o|m| |t|h|e| |l|i|s|t| |╗| +0#0000000#ffffff0@21 -|3| @20|║+0#0000001#ffd7ff255| @28|║| +0#0000000#ffffff0@21 +|2| @73 +|3| @20|╔+0#0000001#ffd7ff255| |m|a|k|e| |a| |c|h|o|i|c|e| |f|r|o|m| |t|h|e| |l|i|s|t| |╗| +0#0000000#ffffff0@21 |4| @20|║+0#0000001#ffd7ff255| |o|n|e| @24|║| +0#0000000#ffffff0@21 |5| @20|║+0#0000001#ffd7ff255| |t|w|o| @24|║| +0#0000000#ffffff0@21 |6| @20|║+0#0000001#ffd7ff255| |a+0#0000000#5fd7ff255|n|o|t|h|e|r| +0#0000001#ffd7ff255@20|║| +0#0000000#ffffff0@21 -|7| @20|║+0#0000001#ffd7ff255| @28|║| +0#0000000#ffffff0@21 -|8| @20|╚+0#0000001#ffd7ff255|═@28|╝| +0#0000000#ffffff0@21 +|7| @20|╚+0#0000001#ffd7ff255|═@28|╝| +0#0000000#ffffff0@21 +|8| @73 |9| @73 @57|1|,|1| @10|T|o|p| diff --git a/src/testdir/dumps/Test_popupwin_menu_maxwidth_1.dump b/src/testdir/dumps/Test_popupwin_menu_maxwidth_1.dump index 1711165373..813fb36126 100644 --- a/src/testdir/dumps/Test_popupwin_menu_maxwidth_1.dump +++ b/src/testdir/dumps/Test_popupwin_menu_maxwidth_1.dump @@ -1,13 +1,13 @@ >╔+0#0000001#ffd7ff255|═@2|╗| +0#0000000#ffffff0@9|╔+0#0000001#ffd7ff255|═@11|╗| +0#0000000#ffffff0@2|╔+0#0000001#ffd7ff255|═@12|╗| +0#0000000#ffffff0@27 -|║+0#0000001#ffd7ff255| @2|║| +0#0000000#ffffff0@9|║+0#0000001#ffd7ff255| @11|║| +0#0000000#ffffff0@2|║+0#0000001#ffd7ff255| @12|║| +0#0000000#ffffff0@27 |║+0#0000001#ffd7ff255| |x+0&#e0e0e08| +0&#ffd7ff255|║| +0#0000000#ffffff0@9|║+0#0000001#ffd7ff255| |1+0&#e0e0e08|2|3|4|5|6|7|8|9||| +0&#ffd7ff255|║| +0#0000000#ffffff0@2|║+0#0000001#ffd7ff255| |1+0&#e0e0e08|2|3|4|5|6|7|8|9||| +0&#ffd7ff255| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@27 -|║+0#0000001#ffd7ff255| @2|║| +0#0000000#ffffff0@9|║+0#0000001#ffd7ff255| @11|║| +0#0000000#ffffff0@2|║+0#0000001#ffd7ff255| |1|2|3|4|5|6|7|8|9||| | +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@27 -|╚+0#0000001#ffd7ff255|═@2|╝| +0#0000000#ffffff0@9|╚+0#0000001#ffd7ff255|═@11|╝| +0#0000000#ffffff0@2|║+0#0000001#ffd7ff255| |1|2|3|4|5|6|7|8|9||| | +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@27 -|6| @30|║+0#0000001#ffd7ff255| @12|║| +0#0000000#ffffff0@27 -|╔+0#0000001#ffd7ff255|═@11|╗| +0#0000000#ffffff0|╔+0#0000001#ffd7ff255|═@11|╗| +0#0000000#ffffff0@2|╚+0#0000001#ffd7ff255|═@12|╝| +0#0000000#ffffff0@27 -|║+0#0000001#ffd7ff255| @11|║| +0#0000000#ffffff0|║+0#0000001#ffd7ff255| @11|║| +0#0000000#ffffff0@45 +|╚+0#0000001#ffd7ff255|═@2|╝| +0#0000000#ffffff0@9|╚+0#0000001#ffd7ff255|═@11|╝| +0#0000000#ffffff0@2|║+0#0000001#ffd7ff255| |1|2|3|4|5|6|7|8|9||| | +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@27 +|4| @30|║+0#0000001#ffd7ff255| |1|2|3|4|5|6|7|8|9||| | +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@27 +|5| @30|╚+0#0000001#ffd7ff255|═@12|╝| +0#0000000#ffffff0@27 +|6| @73 +|╔+0#0000001#ffd7ff255|═@11|╗| +0#0000000#ffffff0|╔+0#0000001#ffd7ff255|═@11|╗| +0#0000000#ffffff0@45 |║+0#0000001#ffd7ff255| |1+0&#e0e0e08|2|3|4|5|6|7|8|9||| +0&#ffd7ff255|║| +0#0000000#ffffff0|║+0#0000001#ffd7ff255| |1+0&#e0e0e08|2|3|4|5|6|7|8|9||| +0&#ffd7ff255|║| +0#0000000#ffffff0@45 -|║+0#0000001#ffd7ff255| @11|║| +0#0000000#ffffff0|║+0#0000001#ffd7ff255| @11|║| +0#0000000#ffffff0@45 -|╚+0#0000001#ffd7ff255|═@11|╝| +0#4040ff13#ffffff0|╚+0#0000001#ffd7ff255|═@11|╝| +0#4040ff13#ffffff0@45 +|╚+0#0000001#ffd7ff255|═@11|╝| +0#0000000#ffffff0|╚+0#0000001#ffd7ff255|═@11|╝| +0#0000000#ffffff0@45 +|1|0| @72 +|~+0#4040ff13&| @73 |~| @73 | +0#0000000&@56|1|,|1| @10|A|l@1| diff --git a/src/testdir/dumps/Test_popupwin_menu_scroll_1.dump b/src/testdir/dumps/Test_popupwin_menu_scroll_1.dump index a2dc0a643c..8db8436f08 100644 --- a/src/testdir/dumps/Test_popupwin_menu_scroll_1.dump +++ b/src/testdir/dumps/Test_popupwin_menu_scroll_1.dump @@ -1,10 +1,10 @@ >1+0&#ffffff0| @73 -|2| @29|╔+0#0000001#ffd7ff255|═@10|╗| +0#0000000#ffffff0@30 -|3| @29|║+0#0000001#ffd7ff255| @10|║| +0#0000000#ffffff0@30 +|2| @73 +|3| @29|╔+0#0000001#ffd7ff255|═@10|╗| +0#0000000#ffffff0@30 |4| @29|║+0#0000001#ffd7ff255| |o|n|e| @5| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@30 |5| @29|║+0#0000001#ffd7ff255| |t+0&#e0e0e08|w|o| +0&#ffd7ff255@5| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@30 |6| @29|║+0#0000001#ffd7ff255| |t|h|r|e@1| @3| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@30 -|7| @29|║+0#0000001#ffd7ff255| @10|║| +0#0000000#ffffff0@30 -|8| @29|╚+0#0000001#ffd7ff255|═@10|╝| +0#0000000#ffffff0@30 +|7| @29|╚+0#0000001#ffd7ff255|═@10|╝| +0#0000000#ffffff0@30 +|8| @73 |9| @73 @57|1|,|1| @10|T|o|p| diff --git a/src/testdir/dumps/Test_popupwin_menu_scroll_2.dump b/src/testdir/dumps/Test_popupwin_menu_scroll_2.dump index 5d5cb146b1..2b8d27050f 100644 --- a/src/testdir/dumps/Test_popupwin_menu_scroll_2.dump +++ b/src/testdir/dumps/Test_popupwin_menu_scroll_2.dump @@ -1,10 +1,10 @@ >1+0&#ffffff0| @73 -|2| @29|╔+0#0000001#ffd7ff255|═@10|╗| +0#0000000#ffffff0@30 -|3| @29|║+0#0000001#ffd7ff255| @10|║| +0#0000000#ffffff0@30 +|2| @73 +|3| @29|╔+0#0000001#ffd7ff255|═@10|╗| +0#0000000#ffffff0@30 |4| @29|║+0#0000001#ffd7ff255| |t|h|r|e@1| @3| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@30 |5| @29|║+0#0000001#ffd7ff255| |f|o|u|r| @4| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@30 |6| @29|║+0#0000001#ffd7ff255| |f+0&#e0e0e08|i|v|e| +0&#ffd7ff255@4| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@30 -|7| @29|║+0#0000001#ffd7ff255| @10|║| +0#0000000#ffffff0@30 -|8| @29|╚+0#0000001#ffd7ff255|═@10|╝| +0#0000000#ffffff0@30 +|7| @29|╚+0#0000001#ffd7ff255|═@10|╝| +0#0000000#ffffff0@30 +|8| @73 |9| @73 @57|1|,|1| @10|T|o|p| diff --git a/src/testdir/dumps/Test_popupwin_menu_scroll_3.dump b/src/testdir/dumps/Test_popupwin_menu_scroll_3.dump index 7a5a6c0a63..ca958122d2 100644 --- a/src/testdir/dumps/Test_popupwin_menu_scroll_3.dump +++ b/src/testdir/dumps/Test_popupwin_menu_scroll_3.dump @@ -1,10 +1,10 @@ >1+0&#ffffff0| @73 -|2| @29|╔+0#0000001#ffd7ff255|═@10|╗| +0#0000000#ffffff0@30 -|3| @29|║+0#0000001#ffd7ff255| @10|║| +0#0000000#ffffff0@30 +|2| @73 +|3| @29|╔+0#0000001#ffd7ff255|═@10|╗| +0#0000000#ffffff0@30 |4| @29|║+0#0000001#ffd7ff255| |s|e|v|e|n| @3| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@30 |5| @29|║+0#0000001#ffd7ff255| |e|i|g|h|t| @3| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@30 |6| @29|║+0#0000001#ffd7ff255| |n+0&#e0e0e08|i|n|e| +0&#ffd7ff255@4| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@30 -|7| @29|║+0#0000001#ffd7ff255| @10|║| +0#0000000#ffffff0@30 -|8| @29|╚+0#0000001#ffd7ff255|═@10|╝| +0#0000000#ffffff0@30 +|7| @29|╚+0#0000001#ffd7ff255|═@10|╝| +0#0000000#ffffff0@30 +|8| @73 |9| @73 @57|1|,|1| @10|T|o|p| diff --git a/src/testdir/dumps/Test_popupwin_menu_scroll_4.dump b/src/testdir/dumps/Test_popupwin_menu_scroll_4.dump index 528496c4b8..dece66aa10 100644 --- a/src/testdir/dumps/Test_popupwin_menu_scroll_4.dump +++ b/src/testdir/dumps/Test_popupwin_menu_scroll_4.dump @@ -1,10 +1,10 @@ >1+0&#ffffff0| @73 -|2| @29|╔+0#0000001#ffd7ff255|═@10|╗| +0#0000000#ffffff0@30 -|3| @29|║+0#0000001#ffd7ff255| @10|║| +0#0000000#ffffff0@30 +|2| @73 +|3| @29|╔+0#0000001#ffd7ff255|═@10|╗| +0#0000000#ffffff0@30 |4| @29|║+0#0000001#ffd7ff255| |s+0&#e0e0e08|e|v|e|n| +0&#ffd7ff255@3| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@30 |5| @29|║+0#0000001#ffd7ff255| |e|i|g|h|t| @3| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@30 |6| @29|║+0#0000001#ffd7ff255| |n|i|n|e| @4| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@30 -|7| @29|║+0#0000001#ffd7ff255| @10|║| +0#0000000#ffffff0@30 -|8| @29|╚+0#0000001#ffd7ff255|═@10|╝| +0#0000000#ffffff0@30 +|7| @29|╚+0#0000001#ffd7ff255|═@10|╝| +0#0000000#ffffff0@30 +|8| @73 |9| @73 @57|1|,|1| @10|T|o|p| diff --git a/src/testdir/dumps/Test_popupwin_menu_scroll_5.dump b/src/testdir/dumps/Test_popupwin_menu_scroll_5.dump index 893a7df939..0410eb9036 100644 --- a/src/testdir/dumps/Test_popupwin_menu_scroll_5.dump +++ b/src/testdir/dumps/Test_popupwin_menu_scroll_5.dump @@ -1,10 +1,10 @@ >1+0&#ffffff0| @73 -|2| @29|╔+0#0000001#ffd7ff255|═@10|╗| +0#0000000#ffffff0@30 -|3| @29|║+0#0000001#ffd7ff255| @10|║| +0#0000000#ffffff0@30 +|2| @73 +|3| @29|╔+0#0000001#ffd7ff255|═@10|╗| +0#0000000#ffffff0@30 |4| @29|║+0#0000001#ffd7ff255| |s+0&#e0e0e08|i|x| +0&#ffd7ff255@5| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@30 |5| @29|║+0#0000001#ffd7ff255| |s|e|v|e|n| @3| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@30 |6| @29|║+0#0000001#ffd7ff255| |e|i|g|h|t| @3| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@30 -|7| @29|║+0#0000001#ffd7ff255| @10|║| +0#0000000#ffffff0@30 -|8| @29|╚+0#0000001#ffd7ff255|═@10|╝| +0#0000000#ffffff0@30 +|7| @29|╚+0#0000001#ffd7ff255|═@10|╝| +0#0000000#ffffff0@30 +|8| @73 |9| @73 @57|1|,|1| @10|T|o|p| diff --git a/src/testdir/dumps/Test_popupwin_menu_scroll_6.dump b/src/testdir/dumps/Test_popupwin_menu_scroll_6.dump index 1980dd4d86..55726bb839 100644 --- a/src/testdir/dumps/Test_popupwin_menu_scroll_6.dump +++ b/src/testdir/dumps/Test_popupwin_menu_scroll_6.dump @@ -1,10 +1,10 @@ >1+0&#ffffff0| @73 -|2| @29|╔+0#0000001#ffd7ff255|═@10|╗| +0#0000000#ffffff0@30 -|3| @29|║+0#0000001#ffd7ff255| @10|║| +0#0000000#ffffff0@30 +|2| @73 +|3| @29|╔+0#0000001#ffd7ff255|═@10|╗| +0#0000000#ffffff0@30 |4| @29|║+0#0000001#ffd7ff255| |o+0&#e0e0e08|n|e| +0&#ffd7ff255@5| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@30 |5| @29|║+0#0000001#ffd7ff255| |t|w|o| @5| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@30 |6| @29|║+0#0000001#ffd7ff255| |t|h|r|e@1| @3| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@30 -|7| @29|║+0#0000001#ffd7ff255| @10|║| +0#0000000#ffffff0@30 -|8| @29|╚+0#0000001#ffd7ff255|═@10|╝| +0#0000000#ffffff0@30 +|7| @29|╚+0#0000001#ffd7ff255|═@10|╝| +0#0000000#ffffff0@30 +|8| @73 |9| @73 @57|1|,|1| @10|T|o|p| diff --git a/src/version.c b/src/version.c index 19c04a5f42..0c56f7d76b 100644 --- a/src/version.c +++ b/src/version.c @@ -778,6 +778,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1690, +/**/ 1689, /**/ 1688, |