mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 05:45:00 +02:00
[BUG_FIXED] Fix auto-completion detection language bug.
[UPDATE] (Author: Motaz) Enhance the installer icon. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@720 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
b94ab27b35
commit
17331e2ed6
Binary file not shown.
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 131 KiB |
@ -3016,19 +3016,22 @@ void Notepad_plus::checkUnicodeMenuItems() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Notepad_plus::showAutoComp() {
|
void Notepad_plus::showAutoComp()
|
||||||
|
{
|
||||||
bool isFromPrimary = _pEditView == &_mainEditView;
|
bool isFromPrimary = _pEditView == &_mainEditView;
|
||||||
AutoCompletion * autoC = isFromPrimary?&_autoCompleteMain:&_autoCompleteSub;
|
AutoCompletion * autoC = isFromPrimary?&_autoCompleteMain:&_autoCompleteSub;
|
||||||
autoC->showAutoComplete();
|
autoC->showAutoComplete();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Notepad_plus::autoCompFromCurrentFile(bool autoInsert) {
|
void Notepad_plus::autoCompFromCurrentFile(bool autoInsert)
|
||||||
|
{
|
||||||
bool isFromPrimary = _pEditView == &_mainEditView;
|
bool isFromPrimary = _pEditView == &_mainEditView;
|
||||||
AutoCompletion * autoC = isFromPrimary?&_autoCompleteMain:&_autoCompleteSub;
|
AutoCompletion * autoC = isFromPrimary?&_autoCompleteMain:&_autoCompleteSub;
|
||||||
autoC->showWordComplete(autoInsert);
|
autoC->showWordComplete(autoInsert);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Notepad_plus::showFunctionComp() {
|
void Notepad_plus::showFunctionComp()
|
||||||
|
{
|
||||||
bool isFromPrimary = _pEditView == &_mainEditView;
|
bool isFromPrimary = _pEditView == &_mainEditView;
|
||||||
AutoCompletion * autoC = isFromPrimary?&_autoCompleteMain:&_autoCompleteSub;
|
AutoCompletion * autoC = isFromPrimary?&_autoCompleteMain:&_autoCompleteSub;
|
||||||
autoC->showFunctionComplete();
|
autoC->showFunctionComplete();
|
||||||
@ -4128,14 +4131,9 @@ void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask)
|
|||||||
|
|
||||||
void Notepad_plus::notifyBufferActivated(BufferID bufid, int view)
|
void Notepad_plus::notifyBufferActivated(BufferID bufid, int view)
|
||||||
{
|
{
|
||||||
|
|
||||||
Buffer * buf = MainFileManager->getBufferByID(bufid);
|
Buffer * buf = MainFileManager->getBufferByID(bufid);
|
||||||
buf->increaseRecentTag();
|
buf->increaseRecentTag();
|
||||||
|
|
||||||
NppParameters *pNppParam = NppParameters::getInstance();
|
|
||||||
const NppGUI & nppGUI = pNppParam->getNppGUI();
|
|
||||||
if (nppGUI._autocStatus == nppGUI.autoc_func)
|
|
||||||
{
|
|
||||||
if (view == MAIN_VIEW)
|
if (view == MAIN_VIEW)
|
||||||
{
|
{
|
||||||
_autoCompleteMain.setLanguage(buf->getLangType());
|
_autoCompleteMain.setLanguage(buf->getLangType());
|
||||||
@ -4144,7 +4142,6 @@ void Notepad_plus::notifyBufferActivated(BufferID bufid, int view)
|
|||||||
{
|
{
|
||||||
_autoCompleteSub.setLanguage(buf->getLangType());
|
_autoCompleteSub.setLanguage(buf->getLangType());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (view != currentView())
|
if (view != currentView())
|
||||||
return; //dont care if another view did something
|
return; //dont care if another view did something
|
||||||
|
Loading…
x
Reference in New Issue
Block a user