Patch 8.1.1934
Problem: Not enough tests for text property popup window.
Solution: Add a few more tests.
Files: src/popupwin.c, src/testdir/test_popupwin_textprop.vim,
src/testdir/dumps/Test_popup_textprop_corn_1.dump,
src/testdir/dumps/Test_popup_textprop_corn_2.dump,
src/testdir/dumps/Test_popup_textprop_corn_3.dump,
src/testdir/dumps/Test_popup_textprop_corn_4.dump
*** ../vim-8.1.1933/src/popupwin.c 2019-08-25 22:24:58.871357010 +0200
--- src/popupwin.c 2019-08-28 22:11:10.164238837 +0200
***************
*** 1103,1109 ****
wantcol = screen_ecol + wantcol;
else
// left of the text
! wantcol = screen_scol + wantcol - 1;
}
if (wp->w_popup_pos == POPPOS_CENTER)
--- 1103,1109 ----
wantcol = screen_ecol + wantcol;
else
// left of the text
! wantcol = screen_scol + wantcol - 2;
}
if (wp->w_popup_pos == POPPOS_CENTER)
*** ../vim-8.1.1933/src/testdir/test_popupwin_textprop.vim 2019-08-25
23:07:34.883383627 +0200
--- src/testdir/test_popupwin_textprop.vim 2019-08-28 22:15:14.279597710
+0200
***************
*** 50,54 ****
--- 50,107 ----
call delete('XtestTextpropPopup')
endfunc
+ func Test_textprop_popup_corners()
+ let lines =<< trim END
+ call setline(1, range(1, 100))
+ call setline(50, 'now working with some longer text here')
+ 50
+ normal zz
+ set scrolloff=0
+ call prop_type_add('popupMarker', #{highlight: 'DiffAdd'})
+ call prop_add(50, 23, #{
+ \ length: 6,
+ \ type: 'popupMarker',
+ \ })
+ let winid = popup_create('bottom left', #{
+ \ pos: 'botleft',
+ \ textprop: 'popupMarker',
+ \ padding: [0,1,0,1],
+ \ })
+ let winid = popup_create('bottom right', #{
+ \ pos: 'botright',
+ \ textprop: 'popupMarker',
+ \ border: [],
+ \ padding: [0,1,0,1],
+ \ })
+ let winid = popup_create('top left', #{
+ \ pos: 'topleft',
+ \ textprop: 'popupMarker',
+ \ border: [],
+ \ padding: [0,1,0,1],
+ \ })
+ let winid = popup_create('top right', #{
+ \ pos: 'topright',
+ \ textprop: 'popupMarker',
+ \ padding: [0,1,0,1],
+ \ })
+ END
+ call writefile(lines, 'XtestTextpropPopupCorners')
+ let buf = RunVimInTerminal('-S XtestTextpropPopupCorners', #{rows: 12})
+ call VerifyScreenDump(buf, 'Test_popup_textprop_corn_1', {})
+
+ call term_sendkeys(buf, "0dw")
+ call VerifyScreenDump(buf, 'Test_popup_textprop_corn_2', {})
+
+ call term_sendkeys(buf, "46Goextra\<Esc>")
+ call VerifyScreenDump(buf, 'Test_popup_textprop_corn_3', {})
+
+ call term_sendkeys(buf, "u")
+ call VerifyScreenDump(buf, 'Test_popup_textprop_corn_4', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('XtestTextpropPopupCorners')
+ endfunc
+
" vim: shiftwidth=2 sts=2
*** ../vim-8.1.1933/src/testdir/dumps/Test_popup_textprop_corn_1.dump
2019-08-28 22:17:02.075236761 +0200
--- src/testdir/dumps/Test_popup_textprop_corn_1.dump 2019-08-28
22:15:26.875557592 +0200
***************
*** 0 ****
--- 1,12 ----
+ |4+0&#ffffff0|5| @72
+ |4|6| @72
+ |4|7| @3|╔+0#0000001#ffd7ff255|═@13|╗| +0#0000000#ffffff0@52
+ |4|8| @3|║+0#0000001#ffd7ff255| |b|o|t@1|o|m| |r|i|g|h|t| |║|
+0#0000000#ffffff0@52
+ |4|9| @3|╚+0#0000001#ffd7ff255|═@13|╝| +0#0000000#ffffff0@5|
+0#0000001#ffd7ff255|b|o|t@1|o|m| |l|e|f|t| | +0#0000000#ffffff0@33
+ >n|o|w| |w|o|r|k|i|n|g| |w|i|t|h| |s|o|m|e| |l+0fd7ff255|o|n|g|e|r|
+0&#ffffff0|t|e|x|t| |h|e|r|e| @36
+ |5|1| @8| +0#0000001#ffd7ff255|t|o|p| |r|i|g|h|t| |
+0#0000000#ffffff0@5|╔+0#0000001#ffd7ff255|═@9|╗| +0#0000000#ffffff0@34
+ |5|2| @25|║+0#0000001#ffd7ff255| |t|o|p| |l|e|f|t| |║| +0#0000000#ffffff0@34
+ |5|3| @25|╚+0#0000001#ffd7ff255|═@9|╝| +0#0000000#ffffff0@34
+ |5|4| @72
+ |5@1| @72
+ @57|5|0|,|1| @9|4|9|%|
*** ../vim-8.1.1933/src/testdir/dumps/Test_popup_textprop_corn_2.dump
2019-08-28 22:17:02.079236747 +0200
--- src/testdir/dumps/Test_popup_textprop_corn_2.dump 2019-08-28
22:15:27.923554228 +0200
***************
*** 0 ****
--- 1,12 ----
+ |4+0&#ffffff0|5| @72
+ |4|6| @72
+ |4|7|╔+0#0000001#ffd7ff255|═@13|╗| +0#0000000#ffffff0@56
+ |4|8|║+0#0000001#ffd7ff255| |b|o|t@1|o|m| |r|i|g|h|t| |║|
+0#0000000#ffffff0@56
+ |4|9|╚+0#0000001#ffd7ff255|═@13|╝| +0#0000000#ffffff0@5|
+0#0000001#ffd7ff255|b|o|t@1|o|m| |l|e|f|t| | +0#0000000#ffffff0@37
+ >w|o|r|k|i|n|g| |w|i|t|h| |s|o|m|e| |l+0fd7ff255|o|n|g|e|r|
+0&#ffffff0|t|e|x|t| |h|e|r|e| @40
+ |5|1| @4| +0#0000001#ffd7ff255|t|o|p| |r|i|g|h|t| |
+0#0000000#ffffff0@5|╔+0#0000001#ffd7ff255|═@9|╗| +0#0000000#ffffff0@38
+ |5|2| @21|║+0#0000001#ffd7ff255| |t|o|p| |l|e|f|t| |║| +0#0000000#ffffff0@38
+ |5|3| @21|╚+0#0000001#ffd7ff255|═@9|╝| +0#0000000#ffffff0@38
+ |5|4| @72
+ |5@1| @72
+ @57|5|0|,|1| @9|4|9|%|
*** ../vim-8.1.1933/src/testdir/dumps/Test_popup_textprop_corn_3.dump
2019-08-28 22:17:02.083236733 +0200
--- src/testdir/dumps/Test_popup_textprop_corn_3.dump 2019-08-28
22:15:28.975550847 +0200
***************
*** 0 ****
--- 1,12 ----
+ |4+0&#ffffff0|5| @72
+ |4|6| @72
+ |e|x|t|r>a| @69
+ |4|7|╔+0#0000001#ffd7ff255|═@13|╗| +0#0000000#ffffff0@56
+ |4|8|║+0#0000001#ffd7ff255| |b|o|t@1|o|m| |r|i|g|h|t| |║|
+0#0000000#ffffff0@56
+ |4|9|╚+0#0000001#ffd7ff255|═@13|╝| +0#0000000#ffffff0@5|
+0#0000001#ffd7ff255|b|o|t@1|o|m| |l|e|f|t| | +0#0000000#ffffff0@37
+ |w|o|r|k|i|n|g| |w|i|t|h| |s|o|m|e| |l+0fd7ff255|o|n|g|e|r|
+0&#ffffff0|t|e|x|t| |h|e|r|e| @40
+ |5|1| @4| +0#0000001#ffd7ff255|t|o|p| |r|i|g|h|t| |
+0#0000000#ffffff0@5|╔+0#0000001#ffd7ff255|═@9|╗| +0#0000000#ffffff0@38
+ |5|2| @21|║+0#0000001#ffd7ff255| |t|o|p| |l|e|f|t| |║| +0#0000000#ffffff0@38
+ |5|3| @21|╚+0#0000001#ffd7ff255|═@9|╝| +0#0000000#ffffff0@38
+ |5|4| @72
+ @57|4|7|,|5| @9|4|8|%|
*** ../vim-8.1.1933/src/testdir/dumps/Test_popup_textprop_corn_4.dump
2019-08-28 22:17:02.087236718 +0200
--- src/testdir/dumps/Test_popup_textprop_corn_4.dump 2019-08-28
22:15:30.023547477 +0200
***************
*** 0 ****
--- 1,12 ----
+ |4+0&#ffffff0|5| @72
+ >4|6| @72
+ |4|7|╔+0#0000001#ffd7ff255|═@13|╗| +0#0000000#ffffff0@56
+ |4|8|║+0#0000001#ffd7ff255| |b|o|t@1|o|m| |r|i|g|h|t| |║|
+0#0000000#ffffff0@56
+ |4|9|╚+0#0000001#ffd7ff255|═@13|╝| +0#0000000#ffffff0@5|
+0#0000001#ffd7ff255|b|o|t@1|o|m| |l|e|f|t| | +0#0000000#ffffff0@37
+ |w|o|r|k|i|n|g| |w|i|t|h| |s|o|m|e| |l+0fd7ff255|o|n|g|e|r|
+0&#ffffff0|t|e|x|t| |h|e|r|e| @40
+ |5|1| @4| +0#0000001#ffd7ff255|t|o|p| |r|i|g|h|t| |
+0#0000000#ffffff0@5|╔+0#0000001#ffd7ff255|═@9|╗| +0#0000000#ffffff0@38
+ |5|2| @21|║+0#0000001#ffd7ff255| |t|o|p| |l|e|f|t| |║| +0#0000000#ffffff0@38
+ |5|3| @21|╚+0#0000001#ffd7ff255|═@9|╝| +0#0000000#ffffff0@38
+ |5|4| @72
+ |5@1| @72
+ |1| |l|i|n|e| |l|e|s@1|;| |b|e|f|o|r|e| |#|3| @1|1| |s|e|c|o|n|d| |a|g|o|
@20|4|6|,|1| @9|4|9|%|
*** ../vim-8.1.1933/src/version.c 2019-08-27 22:48:12.741480663 +0200
--- src/version.c 2019-08-28 22:17:09.783209515 +0200
***************
*** 763,764 ****
--- 763,766 ----
{ /* Add new patch number below this line */
+ /**/
+ 1934,
/**/
--
hundred-and-one symptoms of being an internet addict:
126. You brag to all of your friends about your date Saturday night...but
you don't tell them it was only in a chat room.
/// Bram Moolenaar -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/201908282019.x7SKJ81R028670%40masaka.moolenaar.net.