comparison src/testdir/test_popupwin_textprop.vim @ 18629:15fe2bd478b0 v8.1.2307

patch 8.1.2307: positioning popup doesn't work for buffer-local textprop Commit: https://github.com/vim/vim/commit/a37cb55da6ba44c5e85a22b03a91e1b663aceddf Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 16 20:03:31 2019 +0100 patch 8.1.2307: positioning popup doesn't work for buffer-local textprop Problem: Positioning popup doesn't work for buffer-local textprop. Solution: Make it work. (closes https://github.com/vim/vim/issues/5225)
author Bram Moolenaar <Bram@vim.org>
date Sat, 16 Nov 2019 20:15:03 +0100
parents 5d5b460926ca
children 49b78d6465e5
comparison
equal deleted inserted replaced
18628:cab958d39c1c 18629:15fe2bd478b0
11 call setline(1, range(1, 100)) 11 call setline(1, range(1, 100))
12 call setline(50, 'some text to work with') 12 call setline(50, 'some text to work with')
13 50 13 50
14 normal zz 14 normal zz
15 set scrolloff=0 15 set scrolloff=0
16 call prop_type_add('popupMarker', #{highlight: 'DiffAdd'}) 16 call prop_type_add('popupMarker', #{highlight: 'DiffAdd', bufnr: bufnr('%')})
17 call prop_add(50, 11, #{ 17 call prop_add(50, 11, #{
18 \ length: 7, 18 \ length: 7,
19 \ type: 'popupMarker', 19 \ type: 'popupMarker',
20 \ bufnr: bufnr('%'),
20 \ }) 21 \ })
21 let winid = popup_create('the text', #{ 22 let winid = popup_create('the text', #{
22 \ pos: 'botleft', 23 \ pos: 'botleft',
23 \ textprop: 'popupMarker', 24 \ textprop: 'popupMarker',
24 \ border: [], 25 \ border: [],
66 \ type: 'popupMarker', 67 \ type: 'popupMarker',
67 \ }) 68 \ })
68 let winid = popup_create('bottom left', #{ 69 let winid = popup_create('bottom left', #{
69 \ pos: 'botleft', 70 \ pos: 'botleft',
70 \ textprop: 'popupMarker', 71 \ textprop: 'popupMarker',
72 \ textpropwin: win_getid(),
71 \ padding: [0,1,0,1], 73 \ padding: [0,1,0,1],
72 \ }) 74 \ })
73 let winid = popup_create('bottom right', #{ 75 let winid = popup_create('bottom right', #{
74 \ pos: 'botright', 76 \ pos: 'botright',
75 \ textprop: 'popupMarker', 77 \ textprop: 'popupMarker',