From cf8a454bacb981411b1af66408ecd88d2a9b6475 Mon Sep 17 00:00:00 2001 From: malc Date: Fri, 5 Apr 2013 22:15:32 +0400 Subject: [PATCH] Improve active lv item tracking --- main.ml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/main.ml b/main.ml index 6f04c3b..97fa494 100644 --- a/main.ml +++ b/main.ml @@ -3473,7 +3473,7 @@ object (self) then -1 else find next incr1 in - if next = -1 || abs (m_active - next) > fstate.maxrows + if abs (m_active - next) > fstate.maxrows then -1 else next in @@ -3486,7 +3486,15 @@ object (self) let next = bound next 0 (itemcount - 1) in find next ~-incr1 in - let active = if next = -1 then m_active else next in + let active = + if next = -1 + then m_active + else ( + if isvisible first next + then next + else m_active + ) + in active, first else let first = min next m_first in -- 2.11.4.GIT