diff options
Diffstat (limited to 'src/testdir/test_popupwin_textprop.vim')
| -rw-r--r-- | src/testdir/test_popupwin_textprop.vim | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/testdir/test_popupwin_textprop.vim b/src/testdir/test_popupwin_textprop.vim index 26950de96..491381592 100644 --- a/src/testdir/test_popupwin_textprop.vim +++ b/src/testdir/test_popupwin_textprop.vim @@ -50,5 +50,58 @@ func Test_textprop_popup() 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 |
