From 781176276fe636f3613caf056d7c77bb602ed973 Mon Sep 17 00:00:00 2001 From: martin Date: Wed, 8 Feb 2012 18:34:00 +0000 Subject: [PATCH] SynEdit: Navigate to end of word / middle of CamelCase word git-svn-id: trunk@35241 - --- components/synedit/synedit.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/synedit/synedit.pp b/components/synedit/synedit.pp index 92dfd2f94e..8e5f871f0f 100644 --- a/components/synedit/synedit.pp +++ b/components/synedit/synedit.pp @@ -3525,7 +3525,7 @@ begin i := Length(ULine); // skip upper While (CX < NX) and (CX <= i) do begin // check entire next utf-8 char to be equal - r := (CX = OX) or (Line[CX] <> '_') or ((CX > 1) and (Line[CX - 1] = '_')); + r := (CX = OX) or (CX <= 1) or (Line[CX-1] <> '_') or ((CX <= i) and (Line[CX] = '_')); j := CX; repeat r := r and (Line[j] = ULine[j]); @@ -3537,7 +3537,7 @@ begin // skip lowercase ULine := LazUTF8.UTF8LowerCase(Line); While (CX < NX) and (CX <= i) do begin // check entire next utf-8 char to be equal - r := (CX = OX) or (Line[CX] <> '_') or ((CX > 1) and (Line[CX - 1] = '_')); + r := (CX = OX) or (CX <= 1) or (Line[CX-1] <> '_') or ((CX <= i) and (Line[CX] = '_')); j := CX; repeat r := r and (Line[j] = ULine[j]);