From 9d9d64fb2cc279f1a3f5ac7de746be8b0931c1b4 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sat, 23 Oct 2010 18:33:49 +0000 Subject: [PATCH] [BUG_FIXED] (Author: Neil Hodgson) Fix for bug #3065912 Fail to Search up when code.page = 936. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@686 f5eea248-9336-0410-98b8-ebc06183d4e3 --- scintilla/src/Document.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scintilla/src/Document.cxx b/scintilla/src/Document.cxx index 47d7c90e..db93f742 100644 --- a/scintilla/src/Document.cxx +++ b/scintilla/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;