[BUG_FIXED] (Author: Pekka Pöyry) Fix the problem that calltip becomes garbage after switching document.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1014 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2013-01-27 18:41:40 +00:00
parent 300343011c
commit e5861b4df1

View File

@ -82,6 +82,14 @@ void FunctionCallTip::setLanguageXML(TiXmlElement * pXmlKeyword) {
if (isVisible()) if (isVisible())
close(); close();
_pXmlKeyword = pXmlKeyword; _pXmlKeyword = pXmlKeyword;
// Clear all buffered values, because they may point to freed memory area.
reset();
// Also clear _funcName so that next getCursorFunction will call loadFunction to parse XML structure
if (_funcName)
delete [] _funcName;
_funcName = 0;
} }
bool FunctionCallTip::updateCalltip(int ch, bool needShown) { bool FunctionCallTip::updateCalltip(int ch, bool needShown) {