adjust the completions box so that it doesn't raise the error mentioned in 12396 anymore
closes PR 12396 original commit: 081dc6c9a1f67862af6a8ae2d7dfcafb21afe686
This commit is contained in:
parent
49d4593939
commit
c0ffac2972
|
@ -3791,14 +3791,15 @@ designates the character that triggers autocompletion
|
||||||
;; handle-mouse-movement : int int -> bool
|
;; handle-mouse-movement : int int -> bool
|
||||||
;; takes an editor coordinate, returns whether it has intercept
|
;; takes an editor coordinate, returns whether it has intercept
|
||||||
(define/public (handle-mouse-movement x y)
|
(define/public (handle-mouse-movement x y)
|
||||||
(let*-values ([(mx my w h) (get-menu-coordinates)])
|
(define-values (mx my w h) (get-menu-coordinates))
|
||||||
|
(define index (floor (inexact->exact (- y my))))
|
||||||
(when (and (<= mx x (+ mx w))
|
(when (and (<= mx x (+ mx w))
|
||||||
(< (+ my menu-padding-y)
|
(< menu-padding-y
|
||||||
y
|
index
|
||||||
(+ my (vector-length (geometry-mouse->menu-item-vector geometry)))))
|
(vector-length (geometry-mouse->menu-item-vector geometry))))
|
||||||
(set! highlighted-menu-item (vector-ref (geometry-mouse->menu-item-vector geometry)
|
(set! highlighted-menu-item (vector-ref (geometry-mouse->menu-item-vector geometry)
|
||||||
(inexact->exact (- y my))))
|
index))
|
||||||
(redraw))))
|
(redraw)))
|
||||||
|
|
||||||
;; get-current-selection : -> string
|
;; get-current-selection : -> string
|
||||||
;; returns the selected string
|
;; returns the selected string
|
||||||
|
|
Loading…
Reference in New Issue
Block a user