File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 255
255
}
256
256
257
257
var container = completion . options . container || ownerDocument . body ;
258
+ var marginBottom = completion . options . marginBottom || 0 ;
258
259
var pos = cm . cursorCoords ( completion . options . alignWithWord ? data . from : null ) ;
259
260
var left = pos . left , top = pos . bottom , below = true ;
260
261
var offsetLeft = 0 , offsetTop = 0 ;
285
286
var startScroll ;
286
287
setTimeout ( function ( ) { startScroll = cm . getScrollInfo ( ) ; } ) ;
287
288
288
- var overlapY = box . bottom - winH ;
289
+ var overlapY = box . bottom + marginBottom - winH ;
289
290
if ( overlapY > 0 ) { // Does not fit below
290
291
var height = box . bottom - box . top , spaceAbove = box . top - ( pos . bottom - pos . top ) - 2
291
292
if ( winH - box . top < spaceAbove ) { // More room at the top
292
293
if ( height > spaceAbove ) hints . style . height = ( height = spaceAbove ) + "px" ;
293
- hints . style . top = ( ( top = pos . top - height ) + offsetTop ) + "px" ;
294
+ hints . style . top = ( ( top = pos . top - height ) - offsetTop ) + "px" ;
294
295
below = false ;
295
296
} else {
296
297
hints . style . height = ( winH - box . top - 2 ) + "px" ;
You can’t perform that action at this time.
0 commit comments