File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -105,5 +105,29 @@ test({
105105 } ,
106106 } ) ;
107107 }
108+
109+ t . step ( {
110+ name : `open() with relative cursor` ,
111+ fn : async ( ) => {
112+ await denops . cmd ( "normal! 10G10" ) ;
113+ await using popupWindow = await popup . open ( denops , {
114+ relative : "cursor" ,
115+ width : 20 ,
116+ height : 20 ,
117+ row : 3 ,
118+ col : 3 ,
119+ } ) ;
120+ console . log ( popupWindow . winid ) ;
121+ assertEquals ( await fn . win_gettype ( denops , popupWindow . winid ) , "popup" ) ;
122+ assertEquals ( await fn . winwidth ( denops , popupWindow . winid ) , 20 ) ;
123+ assertEquals ( await fn . winheight ( denops , popupWindow . winid ) , 20 ) ;
124+
125+ const info = ( await fn . getwininfo ( denops , popupWindow . winid ) ) [ 0 ] ;
126+ assertEquals ( info . winrow , 13 ) ;
127+ assertEquals ( info . wincol , 13 ) ;
128+
129+ await denops . cmd ( "normal! 0G0" ) ;
130+ } ,
131+ } )
108132 } ,
109133} ) ;
You can’t perform that action at this time.
0 commit comments