From 45481e65afcd7d6861d5d8a6f6b440c42e7792bb Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sat, 13 Nov 2010 23:49:39 +0000 Subject: [PATCH] [NEW] (Author: Ben) Remove Calltip restriction from plugins side. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@701 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/ScitillaComponent/FunctionCallTip.cpp | 8 +++++--- PowerEditor/src/ScitillaComponent/FunctionCallTip.h | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/PowerEditor/src/ScitillaComponent/FunctionCallTip.cpp b/PowerEditor/src/ScitillaComponent/FunctionCallTip.cpp index dcb110ff6..36438c774 100644 --- a/PowerEditor/src/ScitillaComponent/FunctionCallTip.cpp +++ b/PowerEditor/src/ScitillaComponent/FunctionCallTip.cpp @@ -102,12 +102,13 @@ void FunctionCallTip::showPrevOverload() { showCalltip(); } -void FunctionCallTip::close() { - if (!isVisible()) { +void FunctionCallTip::close() +{ + if (!isVisible() || !_selfActivated) return; - } _pEditView->execute(SCI_CALLTIPCANCEL); + _selfActivated = false; _currentOverload = 0; } @@ -406,6 +407,7 @@ void FunctionCallTip::showCalltip() _startPos = _curPos; _pEditView->showCallTip(_startPos, textBuffer); + _selfActivated = true; if (highlightstart != highlightend) { _pEditView->execute(SCI_CALLTIPSETHLT, highlightstart, highlightend); } diff --git a/PowerEditor/src/ScitillaComponent/FunctionCallTip.h b/PowerEditor/src/ScitillaComponent/FunctionCallTip.h index f9f33cc93..410f1b83e 100644 --- a/PowerEditor/src/ScitillaComponent/FunctionCallTip.h +++ b/PowerEditor/src/ScitillaComponent/FunctionCallTip.h @@ -30,7 +30,8 @@ public: FunctionCallTip(ScintillaEditView * pEditView) : _pEditView(pEditView), _pXmlKeyword(NULL), _curPos(0), _startPos(0), _curFunction(NULL), _currentNrOverloads(0), _currentOverload(0), _currentParam(0), _funcName(NULL), - _start('('), _stop(')'), _param(','), _terminal(';'), _ignoreCase(true), _additionalWordChar(TEXT("")) + _start('('), _stop(')'), _param(','), _terminal(';'), _ignoreCase(true), + _additionalWordChar(TEXT("")), _selfActivated(false) {}; ~FunctionCallTip() {/* cleanup(); */}; void setLanguageXML(TiXmlElement * pXmlKeyword); //set calltip keyword node @@ -63,6 +64,7 @@ private: TCHAR _terminal; generic_string _additionalWordChar; bool _ignoreCase; + bool _selfActivated; bool getCursorFunction(); //retrieve data about function at cursor. Returns true if a function was found. Calls loaddata if needed bool loadFunction(); //returns true if the function can be found