Fix Javascript autocompletion not working regression.
This commit is contained in:
parent
8e103d837a
commit
986492e47b
@ -669,19 +669,21 @@ void AutoCompletion::insertMatchedChars(int character, const MatchedPairConf & m
|
|||||||
|
|
||||||
void AutoCompletion::update(int character)
|
void AutoCompletion::update(int character)
|
||||||
{
|
{
|
||||||
|
if (!character)
|
||||||
|
return;
|
||||||
|
|
||||||
const NppGUI & nppGUI = NppParameters::getInstance()->getNppGUI();
|
const NppGUI & nppGUI = NppParameters::getInstance()->getNppGUI();
|
||||||
if (!_funcCompletionActive && nppGUI._autocStatus == nppGUI.autoc_func)
|
if (!_funcCompletionActive && nppGUI._autocStatus == nppGUI.autoc_func)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (nppGUI._funcParams || _funcCalltip.isVisible()) {
|
if (nppGUI._funcParams || _funcCalltip.isVisible())
|
||||||
if (_funcCalltip.updateCalltip(character)) { //calltip visible because triggered by autocomplete, set mode
|
{
|
||||||
|
if (_funcCalltip.updateCalltip(character)) //calltip visible because triggered by autocomplete, set mode
|
||||||
|
{
|
||||||
return; //only return in case of success, else autocomplete
|
return; //only return in case of success, else autocomplete
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!character)
|
|
||||||
return;
|
|
||||||
|
|
||||||
//If autocomplete already active, let Scintilla handle it
|
//If autocomplete already active, let Scintilla handle it
|
||||||
if (_pEditView->execute(SCI_AUTOCACTIVE) != 0)
|
if (_pEditView->execute(SCI_AUTOCACTIVE) != 0)
|
||||||
return;
|
return;
|
||||||
@ -698,7 +700,6 @@ void AutoCompletion::update(int character)
|
|||||||
showApiComplete();
|
showApiComplete();
|
||||||
else if (nppGUI._autocStatus == nppGUI.autoc_both)
|
else if (nppGUI._autocStatus == nppGUI.autoc_both)
|
||||||
showApiAndWordComplete();
|
showApiAndWordComplete();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -845,6 +846,9 @@ const TCHAR * AutoCompletion::getApiFileName()
|
|||||||
if (_curLang > L_EXTERNAL)
|
if (_curLang > L_EXTERNAL)
|
||||||
_curLang = L_TEXT;
|
_curLang = L_TEXT;
|
||||||
|
|
||||||
|
if (_curLang == L_JAVASCRIPT)
|
||||||
|
_curLang = L_JS;
|
||||||
|
|
||||||
return ScintillaEditView::langNames[_curLang].lexerName;
|
return ScintillaEditView::langNames[_curLang].lexerName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user