diff --git a/scheme/select-list.scm b/scheme/select-list.scm index 0a38ea2..7047490 100644 --- a/scheme/select-list.scm +++ b/scheme/select-list.scm @@ -143,7 +143,8 @@ (paint-selection-list-at select-list 0 0 win result-buffer have-focus?)) (define (paint-selection-list-at select-list x y win result-buffer have-focus?) - (let ((num-lines (select-list-num-lines select-list))) + (let ((num-lines (select-list-num-lines select-list)) + (cursor-index (select-list-cursor-index select-list))) (let lp ((elts (select-visible-elements select-list num-lines)) (y y) @@ -151,7 +152,7 @@ (cond ((null? elts) (values)) - ((= i (select-list-cursor-index select-list)) + ((= i cursor-index) (wattron win (A-REVERSE)) (mvwaddstr win y x (element-text (car elts))) (wattrset win (A-NORMAL))