[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
This commit is contained in:
Don Ho 2012-04-11 21:25:52 +00:00
parent 9d6671a685
commit 8c3f729f3d
2 changed files with 4 additions and 4 deletions

View File

@ -4483,7 +4483,6 @@ int Notepad_plus::getLangFromMenuName(const TCHAR * langName)
generic_string Notepad_plus::getLangFromMenu(const Buffer * buf) generic_string Notepad_plus::getLangFromMenu(const Buffer * buf)
{ {
int id; int id;
generic_string userLangName; generic_string userLangName;
const int nbChar = 32; const int nbChar = 32;
@ -4802,8 +4801,9 @@ void Notepad_plus::launchDocMap()
_pDocMap->initWrapMap(); _pDocMap->initWrapMap();
_pDocMap->wrapMap(); _pDocMap->wrapMap();
_pDocMap->display(); _pDocMap->display();
_pEditView->getFocus();
} }

View File

@ -84,7 +84,7 @@ bool AutoCompletion::showWordComplete(bool autoInsert)
generic_string expr(TEXT("\\<")); generic_string expr(TEXT("\\<"));
expr += beginChars; expr += beginChars;
expr += TEXT("[^ \\t.,;:\"()=<>'+!\\[\\]]*"); expr += TEXT("[^ \\t\\n\\r.,;:\"()=<>'+!\\[\\]]*");
int docLength = int(_pEditView->execute(SCI_GETLENGTH)); int docLength = int(_pEditView->execute(SCI_GETLENGTH));
@ -106,7 +106,7 @@ bool AutoCompletion::showWordComplete(bool autoInsert)
TCHAR w[bufSize]; TCHAR w[bufSize];
_pEditView->getGenericText(w, wordStart, wordEnd); _pEditView->getGenericText(w, wordStart, wordEnd);
if (lstrcmp(w, beginChars)) if (lstrcmp(w, beginChars) != 0)
if (!isInList(w, wordArray)) if (!isInList(w, wordArray))
wordArray.push_back(w); wordArray.push_back(w);
} }