Loop invariant code motion for cursor-index
part of darcs patch Sun Sep 18 17:39:17 EEST 2005 Martin Gasbichler <gasbichl@informatik.uni-tuebingen.de>
This commit is contained in:
parent
48b7f617e0
commit
4d6cb75cd6
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue