From f36f15772187a166cfa9f6c63c6ec6df6cba7088 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 15 Sep 2010 10:27:08 +1000 Subject: Fix for bug #3065912 Fail to Search up when code.page = 936 --- src/Document.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Document.cxx b/src/Document.cxx index f9627f066..5bf9adbe4 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -549,7 +549,7 @@ int Document::NextPosition(int pos, int moveDir) { // See http://msdn.microsoft.com/en-us/library/cc194792%28v=MSDN.10%29.aspx // http://msdn.microsoft.com/en-us/library/cc194790.aspx if ((pos - 1) <= posStartLine) { - return posStartLine; + return posStartLine - 1; } else if (IsDBCSLeadByte(cb.CharAt(pos - 1))) { // Must actually be trail byte return pos - 2; -- cgit v1.2.3