Patch 8.2.0096
Problem: Cannot create tiny popup window in last column. (Daniel Steinberg)
Solution: Remove position limit. (closes #5447)
Files: src/popupwin.c, src/testdir/test_popupwin.vim,
src/testdir/dumps/Test_popupwin_20.dump,
src/testdir/dumps/Test_popupwin_21.dump
*** ../vim-8.2.0095/src/popupwin.c 2019-12-11 19:31:27.000000000 +0100
--- src/popupwin.c 2020-01-06 22:04:49.888121851 +0100
***************
*** 1222,1229 ****
|| wp->w_popup_pos == POPPOS_BOTLEFT))
{
wp->w_wincol = wantcol - 1;
! if (wp->w_wincol >= Columns - 3)
! wp->w_wincol = Columns - 3;
}
}
--- 1222,1229 ----
|| wp->w_popup_pos == POPPOS_BOTLEFT))
{
wp->w_wincol = wantcol - 1;
! if (wp->w_wincol >= Columns - 1)
! wp->w_wincol = Columns - 1;
}
}
*** ../vim-8.2.0095/src/testdir/test_popupwin.vim 2019-12-11 19:22:41.000000000 +0100
--- src/testdir/test_popupwin.vim 2020-01-06 23:01:27.030577053 +0100
***************
*** 89,94 ****
--- 89,98 ----
call popup_create('paddings', #{line: 6, col: 23, padding: [1, 3, 2, 4]})
call popup_create('wrapped longer text', #{line: 8, col: 55, padding: [0, 3, 0, 3], border: [0, 1, 0, 1]})
call popup_create('right aligned text', #{line: 11, col: 56, wrap: 0, padding: [0, 3, 0, 3], border: [0, 1, 0, 1]})
+ call popup_create('X', #{line: 2, col: 73})
+ call popup_create('X', #{line: 3, col: 74})
+ call popup_create('X', #{line: 4, col: 75})
+ call popup_create('X', #{line: 5, col: 76})
END
call insert(lines, iter == 1 ? '' : 'set enc=latin1')
call writefile(lines, 'XtestPopupBorder')
***************
*** 1634,1641 ****
endfunc
func Test_popup_position_adjust()
! " Anything placed past 2 cells from of the right of the screen is moved to the
! " left.
"
" When wrapping is disabled, we also shift to the left to display on the
" screen, unless fixed is set.
--- 1638,1645 ----
endfunc
func Test_popup_position_adjust()
! " Anything placed past the last cell on the right of the screen is moved to
! " the left.
"
" When wrapping is disabled, we also shift to the left to display on the
" screen, unless fixed is set.
***************
*** 1643,1666 ****
" Entries for cases which don't vary based on wrapping.
" Format is per tests described below
let both_wrap_tests = [
! \ ['a', 5, &columns, 5, &columns - 2, 1, 1],
! \ ['b', 5, &columns + 1, 5, &columns - 2, 1, 1],
! \ ['c', 5, &columns - 1, 5, &columns - 2, 1, 1],
\ ['d', 5, &columns - 2, 5, &columns - 2, 1, 1],
! \ ['e', 5, &columns - 3, 5, &columns - 3, 1, 1],
! \
! \ ['aa', 5, &columns, 5, &columns - 2, 2, 1],
! \ ['bb', 5, &columns + 1, 5, &columns - 2, 2, 1],
! \ ['cc', 5, &columns - 1, 5, &columns - 2, 2, 1],
! \ ['dd', 5, &columns - 2, 5, &columns - 2, 2, 1],
! \ ['ee', 5, &columns - 3, 5, &columns - 3, 2, 1],
! \
! \ ['aaa', 5, &columns, 5, &columns - 2, 3, 1],
! \ ['bbb', 5, &columns + 1, 5, &columns - 2, 3, 1],
! \ ['ccc', 5, &columns - 1, 5, &columns - 2, 3, 1],
! \ ['ddd', 5, &columns - 2, 5, &columns - 2, 3, 1],
! \ ['eee', 5, &columns - 3, 5, &columns - 3, 3, 1],
! \ ]
" these test groups are dicts with:
" - comment: something to identify the group of tests by
--- 1647,1657 ----
" Entries for cases which don't vary based on wrapping.
" Format is per tests described below
let both_wrap_tests = [
! \ ['a', 5, &columns, 5, &columns, 1, 1],
! \ ['b', 5, &columns + 1, 5, &columns, 1, 1],
! \ ['c', 5, &columns - 1, 5, &columns - 1, 1, 1],
\ ['d', 5, &columns - 2, 5, &columns - 2, 1, 1],
! \ ['e', 5, &columns - 3, 5, &columns - 3, 1, 1]]
" these test groups are dicts with:
" - comment: something to identify the group of tests by
***************
*** 1681,1691 ****
\ pos: 'botleft',
\ },
\ tests: both_wrap_tests + [
! \ ['aaaa', 5, &columns, 4, &columns - 2, 3, 2],
! \ ['bbbb', 5, &columns + 1, 4, &columns - 2, 3, 2],
! \ ['cccc', 5, &columns - 1, 4, &columns - 2, 3, 2],
\ ['dddd', 5, &columns - 2, 4, &columns - 2, 3, 2],
\ ['eeee', 5, &columns - 3, 5, &columns - 3, 4, 1],
\ ],
\ },
\ #{
--- 1672,1695 ----
\ pos: 'botleft',
\ },
\ tests: both_wrap_tests + [
! \ ['aa', 5, &columns, 4, &columns, 1, 2],
! \ ['bb', 5, &columns + 1, 4, &columns, 1, 2],
! \ ['cc', 5, &columns - 1, 5, &columns - 1, 2, 1],
! \ ['dd', 5, &columns - 2, 5, &columns - 2, 2, 1],
! \ ['ee', 5, &columns - 3, 5, &columns - 3, 2, 1],
! \
! \ ['aaa', 5, &columns, 3, &columns, 1, 3],
! \ ['bbb', 5, &columns + 1, 3, &columns, 1, 3],
! \ ['ccc', 5, &columns - 1, 4, &columns - 1, 2, 2],
! \ ['ddd', 5, &columns - 2, 5, &columns - 2, 3, 1],
! \ ['eee', 5, &columns - 3, 5, &columns - 3, 3, 1],
! \
! \ ['aaaa', 5, &columns, 2, &columns, 1, 4],
! \ ['bbbb', 5, &columns + 1, 2, &columns, 1, 4],
! \ ['cccc', 5, &columns - 1, 4, &columns - 1, 2, 2],
\ ['dddd', 5, &columns - 2, 4, &columns - 2, 3, 2],
\ ['eeee', 5, &columns - 3, 5, &columns - 3, 4, 1],
+ \ ['eeee', 5, &columns - 4, 5, &columns - 4, 4, 1],
\ ],
\ },
\ #{
***************
*** 1695,1700 ****
--- 1699,1716 ----
\ pos: 'botleft',
\ },
\ tests: both_wrap_tests + [
+ \ ['aa', 5, &columns, 5, &columns - 1, 2, 1],
+ \ ['bb', 5, &columns + 1, 5, &columns - 1, 2, 1],
+ \ ['cc', 5, &columns - 1, 5, &columns - 1, 2, 1],
+ \ ['dd', 5, &columns - 2, 5, &columns - 2, 2, 1],
+ \ ['ee', 5, &columns - 3, 5, &columns - 3, 2, 1],
+ \
+ \ ['aaa', 5, &columns, 5, &columns - 2, 3, 1],
+ \ ['bbb', 5, &columns + 1, 5, &columns - 2, 3, 1],
+ \ ['ccc', 5, &columns - 1, 5, &columns - 2, 3, 1],
+ \ ['ddd', 5, &columns - 2, 5, &columns - 2, 3, 1],
+ \ ['eee', 5, &columns - 3, 5, &columns - 3, 3, 1],
+ \
\ ['aaaa', 5, &columns, 5, &columns - 3, 4, 1],
\ ['bbbb', 5, &columns + 1, 5, &columns - 3, 4, 1],
\ ['cccc', 5, &columns - 1, 5, &columns - 3, 4, 1],
***************
*** 1710,1718 ****
\ pos: 'botleft',
\ },
\ tests: both_wrap_tests + [
! \ ['aaaa', 5, &columns, 5, &columns - 2, 3, 1],
! \ ['bbbb', 5, &columns + 1, 5, &columns - 2, 3, 1],
! \ ['cccc', 5, &columns - 1, 5, &columns - 2, 3, 1],
\ ['dddd', 5, &columns - 2, 5, &columns - 2, 3, 1],
\ ['eeee', 5, &columns - 3, 5, &columns - 3, 4, 1],
\ ],
--- 1726,1746 ----
\ pos: 'botleft',
\ },
\ tests: both_wrap_tests + [
! \ ['aa', 5, &columns, 5, &columns, 1, 1],
! \ ['bb', 5, &columns + 1, 5, &columns, 1, 1],
! \ ['cc', 5, &columns - 1, 5, &columns - 1, 2, 1],
! \ ['dd', 5, &columns - 2, 5, &columns - 2, 2, 1],
! \ ['ee', 5, &columns - 3, 5, &columns - 3, 2, 1],
! \
! \ ['aaa', 5, &columns, 5, &columns, 1, 1],
! \ ['bbb', 5, &columns + 1, 5, &columns, 1, 1],
! \ ['ccc', 5, &columns - 1, 5, &columns - 1, 2, 1],
! \ ['ddd', 5, &columns - 2, 5, &columns - 2, 3, 1],
! \ ['eee', 5, &columns - 3, 5, &columns - 3, 3, 1],
! \
! \ ['aaaa', 5, &columns, 5, &columns, 1, 1],
! \ ['bbbb', 5, &columns + 1, 5, &columns, 1, 1],
! \ ['cccc', 5, &columns - 1, 5, &columns - 1, 2, 1],
\ ['dddd', 5, &columns - 2, 5, &columns - 2, 3, 1],
\ ['eeee', 5, &columns - 3, 5, &columns - 3, 4, 1],
\ ],
*** ../vim-8.2.0095/src/testdir/dumps/Test_popupwin_20.dump 2019-08-04 18:10:23.000000000 +0200
--- src/testdir/dumps/Test_popupwin_20.dump 2020-01-06 22:10:27.782702685 +0100
***************
*** 1,9 ****
>1+0&#ffffff0| @73
! |2| |++0#0000001#ffd7ff255|-@11|+| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|+|-@11|+| @18
! |3| ||+0#0000001#ffd7ff255|h|e|l@1|o| |b|o|r|d|e|r||| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255|h|e|l@1|o| |p|a|d@1|i|n|g| | +0#0000000#ffffff0@4||| @11||| @18
! |4| |++0#0000001#ffd7ff255|-@11|+| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4||| |h|e|l@1|o| |b|o|t|h| ||| @18
! |5| @40||| @11||| @18
! |6| |++0#0000001#ffd7ff255|-@8| +0#0000000#ffffff0@9| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|+|-@11|+| @18
|7| ||+0#0000001#ffd7ff255|b|o|r|d|e|r| |T|L| +0#0000000#ffffff0@9| +0#0000001#ffd7ff255@3|p|a|d@1|i|n|g|s| @2| +0#0000000#ffffff0@37
|8| @20| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@12||+0#0000001#ffd7ff255| @2|w|r|a|p@1|e|d| |l|o|n|g|e|r| |t|e| @2||
|9+0#0000000#ffffff0| @20| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@12||+0#0000001#ffd7ff255| @2|x|t| @17||
--- 1,9 ----
>1+0&#ffffff0| @73
! |2| |++0#0000001#ffd7ff255|-@11|+| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|+|-@11|+| @15|X+0#0000001#ffd7ff255| +0#0000000#ffffff0@1
! |3| ||+0#0000001#ffd7ff255|h|e|l@1|o| |b|o|r|d|e|r||| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255|h|e|l@1|o| |p|a|d@1|i|n|g| | +0#0000000#ffffff0@4||| @11||| @16|X+0#0000001#ffd7ff255| +0#0000000#ffffff0
! |4| |++0#0000001#ffd7ff255|-@11|+| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4||| |h|e|l@1|o| |b|o|t|h| ||| @17|X+0#0000001#ffd7ff255
! |5+0#0000000#ffffff0| @40||| @11||| @17|X+0#0000001#ffd7ff255
! |6+0#0000000#ffffff0| |++0#0000001#ffd7ff255|-@8| +0#0000000#ffffff0@9| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|+|-@11|+| @18
|7| ||+0#0000001#ffd7ff255|b|o|r|d|e|r| |T|L| +0#0000000#ffffff0@9| +0#0000001#ffd7ff255@3|p|a|d@1|i|n|g|s| @2| +0#0000000#ffffff0@37
|8| @20| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@12||+0#0000001#ffd7ff255| @2|w|r|a|p@1|e|d| |l|o|n|g|e|r| |t|e| @2||
|9+0#0000000#ffffff0| @20| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@12||+0#0000001#ffd7ff255| @2|x|t| @17||
*** ../vim-8.2.0095/src/testdir/dumps/Test_popupwin_21.dump 2019-08-04 18:10:24.000000000 +0200
--- src/testdir/dumps/Test_popupwin_21.dump 2020-01-06 22:10:28.898690760 +0100
***************
*** 1,9 ****
>1+0&#ffffff0| @73
! |2| |╔+0#0000001#ffd7ff255|═@11|╗| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|╔|═@11|╗| @18
! |3| |║+0#0000001#ffd7ff255|h|e|l@1|o| |b|o|r|d|e|r|║| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255|h|e|l@1|o| |p|a|d@1|i|n|g| | +0#0000000#ffffff0@4|║| @11|║| @18
! |4| |╚+0#0000001#ffd7ff255|═@11|╝| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|║| |h|e|l@1|o| |b|o|t|h| |║| @18
! |5| @40|║| @11|║| @18
! |6| |╔+0#0000001#ffd7ff255|═@8| +0#0000000#ffffff0@9| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|╚|═@11|╝| @18
|7| |║+0#0000001#ffd7ff255|b|o|r|d|e|r| |T|L| +0#0000000#ffffff0@9| +0#0000001#ffd7ff255@3|p|a|d@1|i|n|g|s| @2| +0#0000000#ffffff0@37
|8| @20| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@12|║+0#0000001#ffd7ff255| @2|w|r|a|p@1|e|d| |l|o|n|g|e|r| |t|e| @2|║
|9+0#0000000#ffffff0| @20| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@12|║+0#0000001#ffd7ff255| @2|x|t| @17|║
--- 1,9 ----
>1+0&#ffffff0| @73
! |2| |╔+0#0000001#ffd7ff255|═@11|╗| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|╔|═@11|╗| @15|X+0#0000001#ffd7ff255| +0#0000000#ffffff0@1
! |3| |║+0#0000001#ffd7ff255|h|e|l@1|o| |b|o|r|d|e|r|║| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255|h|e|l@1|o| |p|a|d@1|i|n|g| | +0#0000000#ffffff0@4|║| @11|║| @16|X+0#0000001#ffd7ff255| +0#0000000#ffffff0
! |4| |╚+0#0000001#ffd7ff255|═@11|╝| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|║| |h|e|l@1|o| |b|o|t|h| |║| @17|X+0#0000001#ffd7ff255
! |5+0#0000000#ffffff0| @40|║| @11|║| @17|X+0#0000001#ffd7ff255
! |6+0#0000000#ffffff0| |╔+0#0000001#ffd7ff255|═@8| +0#0000000#ffffff0@9| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|╚|═@11|╝| @18
|7| |║+0#0000001#ffd7ff255|b|o|r|d|e|r| |T|L| +0#0000000#ffffff0@9| +0#0000001#ffd7ff255@3|p|a|d@1|i|n|g|s| @2| +0#0000000#ffffff0@37
|8| @20| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@12|║+0#0000001#ffd7ff255| @2|w|r|a|p@1|e|d| |l|o|n|g|e|r| |t|e| @2|║
|9+0#0000000#ffffff0| @20| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@12|║+0#0000001#ffd7ff255| @2|x|t| @17|║
*** ../vim-8.2.0095/src/version.c 2020-01-06 21:47:17.044023198 +0100
--- src/version.c 2020-01-06 23:07:09.441147563 +0100
***************
*** 744,745 ****
--- 744,747 ----
{ /* Add new patch number below this line */
+ /**/
+ 96,
/**/
--
You can be stopped by the police for biking over 65 miles per hour.
You are not allowed to walk across a street on your hands.
[real standing laws in Connecticut, United States of America]
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///