From cf943e09a29f255ec4f7fa8a7c6fc7813ea9ded0 Mon Sep 17 00:00:00 2001 From: Jochen Dolze Date: Tue, 5 Oct 2010 23:55:58 +0200 Subject: Improved start/stop mark processing --- command/marks.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'command/marks.cpp') diff --git a/command/marks.cpp b/command/marks.cpp index 18dabf4..8d433c4 100644 --- a/command/marks.cpp +++ b/command/marks.cpp @@ -205,6 +205,7 @@ clMark *clMarks::GetPrev(int Position, int Type, int Mask) else { if (!mark) mark=last; + else mark=mark->Prev(); while (mark) { if ((mark->type & Mask)==Type) break; @@ -222,15 +223,15 @@ clMark *clMarks::GetNext(int Position, int Type, int Mask) { if (Type==0xFF) { - if (mark->position>=Position) break; + if (mark->position>Position) break; } else { - if ((mark->position>=Position) && ((mark->type & Mask)==Type)) break; + if ((mark->position>Position) && ((mark->type & Mask)==Type)) break; } mark=mark->Next(); } - if (mark) return mark->Next(); + if (mark) return mark; return NULL; } -- cgit v1.2.3