From 8c3f729f3d9d4c695d583b5126913c44538929dd Mon Sep 17 00:00:00 2001 From: Don Ho Date: Wed, 11 Apr 2012 21:25:52 +0000 Subject: [PATCH] [BUG_FIXED] 1. Fix focus on document map bug after its launch. 2. Fix auto-completion bug. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@892 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 4 ++-- PowerEditor/src/ScitillaComponent/AutoCompletion.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 8b289874..dce85772 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -4483,7 +4483,6 @@ int Notepad_plus::getLangFromMenuName(const TCHAR * langName) generic_string Notepad_plus::getLangFromMenu(const Buffer * buf) { - int id; generic_string userLangName; const int nbChar = 32; @@ -4802,8 +4801,9 @@ void Notepad_plus::launchDocMap() _pDocMap->initWrapMap(); _pDocMap->wrapMap(); - _pDocMap->display(); + + _pEditView->getFocus(); } diff --git a/PowerEditor/src/ScitillaComponent/AutoCompletion.cpp b/PowerEditor/src/ScitillaComponent/AutoCompletion.cpp index bea24d77..39ccecfc 100644 --- a/PowerEditor/src/ScitillaComponent/AutoCompletion.cpp +++ b/PowerEditor/src/ScitillaComponent/AutoCompletion.cpp @@ -84,7 +84,7 @@ bool AutoCompletion::showWordComplete(bool autoInsert) generic_string expr(TEXT("\\<")); expr += beginChars; - expr += TEXT("[^ \\t.,;:\"()=<>'+!\\[\\]]*"); + expr += TEXT("[^ \\t\\n\\r.,;:\"()=<>'+!\\[\\]]*"); int docLength = int(_pEditView->execute(SCI_GETLENGTH)); @@ -106,7 +106,7 @@ bool AutoCompletion::showWordComplete(bool autoInsert) TCHAR w[bufSize]; _pEditView->getGenericText(w, wordStart, wordEnd); - if (lstrcmp(w, beginChars)) + if (lstrcmp(w, beginChars) != 0) if (!isInList(w, wordArray)) wordArray.push_back(w); }